Unity deletes files itself from my asset folder on Mac OS - firebase

I've got a problem with Unity installed on Mac OS (Unity 2020.1.16f1 Personal and Mac OS Catalina 10.15.6)
It's look like Unity delete files by itself from my asset folder.
It occurs with both a Firebase (Firebase SDK 7.0.2) and PNG file.
The deletion seems to occur something like each hour (more or less)
However the problem don't happen with all my assets, for exemple with the Firebase SDK it seems that only the file FirebaseCppApp-7_0_2.bundle (and with my png file it happens only with a specific file).
Here's how I get the problem (exemple with Firebase SDK):
I import Firebase SDK I need into Unity (Import Package -> Custom Package and then choose the one I need)
Got this error: "DllNotFoundException: FirebaseCppApp-7_0_2"
Correct this error by going to Security And Confidentiality of my Mac and authorize Firebase to be open (when you download something from internet directly sometimes your Mac ask for this authorization because he don't recognize the developer)
Work perfectly for approximately 1 hour (I can make all changes I want, test my game with the game mode etc ...)
After 1 hour get the error of 2) again (on game mode)
I can fix the problem by reimport only one file from the SDK (FirebaseCppApp-7_0_2.bundle locate in Assets/Firebase/Plugins/x86_64/)
The first time I click play in Game Mode Unity crashes
Go to 3) step and continue
Is someone already get this error ? I've found multiple thread on internet talking about similar bugs (but not exactly the same) but nothing worked for me ...

I found and correct the problem. In fact the problem came from the iCloud which seems to not works correctly with Unity. For some obscur reason, the files which were deleted didn't sync with iCloud, and so when iCloud sent back the project the files were missing. You need to disable automatic sync with iCloud.

Some earlier versions of the Firebase SDK offered to add packages to the Unity Package Manager and would migrate files automatically. I would suggest using only unitypackage integration and trying to undo this migration in the process now. To see if this is the issue, do the following:
close Unity
open Packages/manifest.json and delete the entry for "ScopedRegistries" and remove any lines under "dependencies": { that start with "com.google. Note that Packages is a sibling of Assets (that is, it's next to rather than inside).
for safety, remove any Firebase packages under Assets. This include the folders:
Assets/ExternalDependencyManager, the (old) Assets/PlayServicesResolver, Assets/Firebase, Assets/Parse, Assets/Editor Default Resources/Firebase, Assets/Plugins/Android/Firebase, and Assets/Plugins/iOS/Firebase.
Download the latest Firebase Unity SDK (you can check the release notes here).
open Unity again and add each UnityPackage you need from the SDK. You can usually follow the errors in the console output if you've forgotten everything you're using.
A less likely issue you might be running into is MacOS's stricter behaviour with respect to gate keeper. There's a video here with a workaround, but since you mention the PNG files disappearing I expect that it's the External Dependency Manager.

Related

Firebase services not working in another device when app is cloned from bitbucket

I've created a Jetpack Compose app in Android Studio and I'm using Firebase services (Auth and Firestore). Everything works fine. I can access and create registers, but is a team project, so I uploaded all the project to Bitbucket, and my team cloned the repo.
When my team tried to login with the same user/password, the app keeps waiting and don't even create an error message in "Log" or "Run" window.
We already tried by adding the next line in AndroidManifest.xml
<uses-permission android:name="android.permission.INTERNET" />
Also, we already sync build.gradle and check for versions of implementations (and that couldn't be the problem because is a cloned repo, so everything remains the same).
As a detail that I think it could be affecting this: the package name in manifest keeps the same. Is this wrong?
When run the app, this seems to be working fine, even throw this messages.
I/FirebaseApp: Device unlocked: initializing all Firebase APIs for app [DEFAULT]
I/FirebaseInitProvider: FirebaseApp initialization successful
And this is what I get from trying to do an auth operation
D/TrafficStats: tagSocket(98) with statsTag=0xffffffff, statsUid=-1
If you have experienced this problem, I would appreciate all the help I can get, thank you so much.
An error occurred in the transfer-and-conversion process, most likely. You wrote code, you compiled it, it ran well. Then, you transferred it to a repo, so if the transfer process was faulty (some file(s) didn't go to the repo / something underwent a partial transfer), it would break right away even if you run it on your own device by downloading from there. Now, if the transfer wasn't faulty, their conversion to an APK could be.
Debugging
To confirm where the problem lies, upload the code to the same bucket as you mention, then download the code again and compile in a fresh project. If it doesn't compile, transfer is faulty (or none of you know how to compile). If it compiles and runs as expected, their conversion/compilation is at fault and you've got nothing to worry about, except the fact that you have a team of useless drunks.
Solution
Should be obvious, if they can't make the end-product by themselves (those useless drunks), give it to them on a platter.
In Studio, go to "Build > Generate APK(s)". A confirmation dialog will have the link to the generated file once it's done. Share the apk directly with your "team" and see if it works. No need to see, it will work. Why do you have all the code if you are in a "team". Is it one of those teams where a single person does everything?

Hot restart error with cannot copy ipa file

While I am aware that Hot Restart is in preview, it was for quite a while now and my testing never really worked since the first time I've tried it. I've waited for a few VS studio versions to come up, hoping that my issue will be fixed. Since I've kept an eye on issues and haven't seen something similar, I tend to believe that the issue is locally with my setup.
Here is the situation:
I've enabled Hot Restart in VS and added my account, picked the team (after I was added) and everything went fine without errors. I have a free apple account, but after I was added to a Team I was able to obtain automatic provisioning to work.
I've tried to set the debug build options similar to how the simulator was set
I've disabled device specific build as I saw in the docs that it can create problems.
I've installed iTunes just as specified in the docs and when I connect my device to my Windows 10 PC, I can select it from the list.
So basically it looks like everything is set up. I use for testing an iphone 7 with latest iOS version.
Here is what happens:
I've selected different types of output logs hopeing to catch some error in there that could lead me to find a solution.
when starting to build I can see "Building offline for a local device" and I can see my provisioning file details on "Detected signed identity"
I see no apparent error while it compiles and does its job, no complains about signing
then it gets to the IpaCopyToStagingDirectory and there it starts to copy a bunch of files from bin\Iphone\Debug to Artifacts\app.iOS.dSYM where I get the final error: Could not copy the file bin\iPhone\Debug\\app.iOS.ipa because it was not found
If I go to the bin folder, there are many files, including app.iOS.exe, but indeed there is no ipa file. I also don't know why it has two \ on its path.
Any ideas why is not working?

React Native iOS unable to locate sqlite database

I am running WatermelonDB (which uses SQLite) on React Native. I am using the iOS simulator, and I am trying to locate the database file so I can query on it directly. It seems that I am able to successfully save to the database, since I can query data from within the app and it gets persisted.
Using htop, I have been able to find the running process of my application running on the simulator. However, when I cd into that directory, I see no .db file. I can even go to the root of all simulators ~/Library/Developer/CoreSimulator/Devices/ and ack for all db files, and still nothing shows up.
Next, I have tried launching the app in Xcode, as I have come across other posts that suggest checking the logs of Xcode, which is supposed to reveal the db location. Alas, this has shown me no information.
I am first interested to know how it is possible that anything at all is getting persisted, given that I cannot find a db file.
Second, should I be building my app from Xcode, or is it fine to use command line react-native run-ios? I can see that running this command uses Xcode under the hood, but I'm not sure if there are benefits to using Xcode. Nonetheless, using Xcode does not provide me with the answer I am looking for.
note: this is not a duplicate of this nor this, as I have followed all suggestions but have been unable to reach the conclusion
You can locate the watermelon.db files on your machine created by the iOS simulator by:
cd /Users/<your username>/Library/Developer/CoreSimulator/Devices
find . -name "watermelon.db"
This will show you the instances of watermelon.db files created by simulators. You can then take the output to an SQLite inspector and open /Users/<your username>/Library/Developer/CoreSimulator/Devices + {file path from find}.
If you have multiple results, then you may need to deduce which simulator is which by matching the ID to the simulator using xcrun instruments -s devices

Firebase Crashlytics For Xamarin iOS- Missing dSYM files

Need Help !!
We are getting caution message on top of the Dashboard in Firebase Crashlytics. We are tried with different technical advises in different forums.
But nothing has worked out for us. We are still seeing the caution message at the top (in red strip) and crashes count is incrementing on every crash but doesn't come to Dashboard.
Here we go with our Firebase Crashlytics integration with project :
We are using Firebase Crashlytics with Xamarin Forms project to record any crashes in Mobile Application.
Since, Firebase Crashlytics SDK & Documentation are mostly on Native Platforms (Android & iOS). But, we still got provision to get packages from NuGet.
Here is the checklist which ensures we are on right direction:
1) Is App released with proper Apple Distribution Provision Profile and Certificate- YES
2) Is Distribution Provision Profile valid in terms expiration date - YES, it is valid till Next year from now.
3) Is GoogleService-Info.plist correctly placed. YES- it was downloaded from Crashlytics console with proper identifier configured. File was placed at root of iOS Project and set Build Action as BundleResource.
4) Did we call required initialisation function at proper place. - YES. Below set of codes ensures we initialised properly Firebase Crashlytics in AppDelegate.cs class.
5) Is your build configuration rightly placed in Release mode. YES
6) Important Point: Firebase Crashlytics was able to process the reported crashes with earlier version of iOS build which were having same project and package configuration and we could able to see the Crashes in readable format till for immediate previous versions.
But suddenly it stopped working when we promoted to production in AppStore (means LIVE in AppStore)
7) Have we uploaded to dSYM file manually to Firebase Crashlytics - YES we TRIED. We followed the steps to upload dSYM using XCode-SWIFT project with POD files.
Here is the setup and step.
POD was installed in appropriate XCode workspaces.
Run Script was executed with recommended POD commands.
Build was succeeded.
Hence, as you see, we are practiced with every advises whichever mentioned in any forum. We have applied, but we don't see, it is coming to Crashlytics Dashboard even then.
Try below command. May be help full.
msbuild "/Users/xxx/projects/myApp/myApp/myApp.iOS/myApp.iOS.csproj" /t:"build" /p:Configuration="AppStore" /p:Platform="iPhone" /p:BuildIpa=true /p:FirebaseCrashlyticsUploadSymbolsEnabled=true
I have tried this command and it is working in my case. I get it from this git thread : https://github.com/xamarin/GoogleApisForiOSComponents/issues/386

Firebase and Unity: Unable to find command line tool error

After following tutorials on how to correctly install firebase into unity for an authentication system, I encountered an error that was:
Unable to find command line tool C:\The E-Learning System\Assets\Firebase\Editor\generate_xml_from_google_services_json.py required for Firebase Android resource generation.
From understnading it can not find either the google services file I imported into the assets folder or it could not find the generate_xml_from_google_services_json.py file. I looked online for people with similar problems could not find a clear answer to fix this.
This is a tool that ships with the SDK to support debugging your game in the Unity Editor. One minor caveat is that an exe actually ships on Windows (I assume that this is your operating system from the C:/). You should make sure that generate_xml_from_google_services_json.exe exists in that same directory (.exe's are typically ignored in many standard .gitignore as a catchall for build files). If it's missing, you can simply re-add the Firebase SDK and double check that this file gets included in your source repository.
If both generate_xml_from_google_services_json.py and generate_xml_from_google_services_json.exe exist under Assets/Firebase/Editor, you may also want to install Python for Windows (especially if you're still running Windows 7 or 8). This is due to a recent patch (as of 6.10.0) that fixes some incompatibilities with generate_xml_from_google_services_json.exe and older Windows variants. If that doesn't help, it would be awesome if you could file an issue or reach out to support directly. If there's a bug in that fallback, it would be helpful to surface that ASAP.
Let me know if that helps!
--Patrick

Resources