-
Notifications
You must be signed in to change notification settings - Fork 434
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Game crashes when joining on Android device? #2580
Comments
Hello @daniellochner thank you for the bug report. Can we get a bit more details to help with troubleshooting? Please provide:
Thank you! |
Hi @daniellochner, Let me know if this resolves your issue? |
Just to leave no "stone unturned": |
If so, then if you wouldn't mind trying:
Let me know if either of the two above approaches (and which one) stops the remote user crashing issue (if either do)? |
Yes, he was definitely using NGO 1.4.0! I will try removing the Relay QOS package though and reporting back. |
Hi Noel, Some progress: When I force set the region to "europe-west-2" like in the allocation settings (as the forums thread suggested), it allowed the user to create a world, but no-one else could join him. This is obviously not a solution, but it at least confirms that there is indeed a problem with QOS. I will switch to Mono now and disable stripping entirely, but please could you have a look into this? Now that it is confirmed that there is actually an issue with QOS. Note: I actually reverted back to NGO 1.3.1, because there was some change that broke something for me in 1.4.0 (to do with asynchronous scene loading). I'll upgrade back though and see what is now going wrong there... Thanks. |
@daniellochner With NGO v1.4.0, there was an update to how clients load scenes. When you are ready for the upgrade to that package (or the v1.5.1 depending upon when you are ready) you might need to set your client synchronization mode to |
Okay, that's good to hear, but this is actually quite a massive issue! It's incredibly frustrating having so many negative reviews because of this. For reference, the game has 4.8 stars on Apple, and 4.3 stars on Google Play. With regards to the loading issue, I don't necessarily want to use the additive mode. I'd just like for it to fade in and out between scenes. My game is actually open source, so maybe you could help provide some insight? Here are the loading and world manager scripts. |
@daniellochner ###Step 2: ###Step 3: ###Step 4 (optional if you want to enable code stripping): According to what I have read about the issue, it seems to be happening/related to the collections package and how the QOS package uses collections. Let me know if this resolves the issue for you? |
That makes it so much simpler to help you out (with NGO related issues). When I get a chance (later today), will pull that repo and install NGO v1.4.0 to see where the issue resides. If you could describe the issue a bit further (i.e. did an exception occur or did the fading scene transition not work correctly?), then it would help expedite my findings and a fix. 👍 |
@NoelStephensUnity
No exceptions. The scene loading works fine, but just doesn't fade in and out. |
This is the solution to that issue. |
There are two possible things happening that could be potentially impacting your scene fading:
For both cases, I am thinking the LoadingScreen scene could be getting unloaded which would destroy any associated assets and cause any fade transition to stop. Are either of the two cases/scenarios happening when the scene transition fading is failing? |
Didn't work I'm afraid. Still the same error message. |
@daniellochner Then try doing a clean build and see if you get that error? |
Alright, I removed all temporary files including the Library folder and tried rebuilding the project, but still the error persists. |
@NoelStephensUnity Could I maybe rather just send you my project's files, and then create a new branch on the public repo for the "2022-LTS-upgrade"? Feels like an endless tsunami of errors that I have very little control over! My email is daniel@daniellochner.com. |
@daniellochner This is the best way to keep track of the submission and would provide me with more insights as to what the issue is at hand. |
Alright, I created the report (IN-43866). |
@daniellochner |
@NoelStephensUnity Ah that's really strange... Let me rather just send all the project files then via the bug reporter. I guess it's also quite intimidating just attaching the entire folder because of secret keys etc. I also don't know if my UGS is fine? Is it fine to share the project ID on the public repo? |
Submitting it via the editor keeps things internal to Unity. It is possibly the best way to handle things like protected keys and the like. Any other means (i.e. don't upload to any public facing site) I would recommend against...keeping it strictly between yourself, your editor, and Unity is the recommended way to handle troubleshooting issues like these where purchased assets (etc) are of a concern. |
@NoelStephensUnity I just cloned the repo and dragged the paid assets in and all works fine. There are a couple of shader errors, but those can just be cleared. Are you copying the paid assets to the right location? "Plugins > External > Paid". |
Ahhh... that is my bad... let me try that. |
@NoelStephensUnity Ah alright great, then that should have been the issue. 👍 You should be able to build and see the error that comes up because of the Unity 2022 upgrade, but to run the game (to see the new scene fading issue), then you'll just need to remember to "Create > Key" and populate the Keys database with random values. (And also of course link to a UGS project!) |
@NoelStephensUnity Did that fix the issue for you? |
@daniellochner |
@NoelStephensUnity There should be a few shader errors which can be ignored. |
@NoelStephensUnity What is going on? 😕 |
@daniellochner If you want to proceed with the upgrade, I think the best thing to do is re-submit a bug issue through the editor but include the entire project so I have all of your settings/configurations (including Android build settings etc) which will help to expedite a resolution to your gradle enableR8 build issue. If you go this path, then just let me know what the issue number is that you get in response to the new submission so I can get it assigned to me internally. |
@NoelStephensUnity Alright, I've re-submitted. The new case number is 45900. |
@NoelStephensUnity Have you imported the project? |
@daniellochner
When I switched to Android and was presented with the Android "Auto-Resolution" dialog I allowed it to "auto-resolve" the conflicts and download the appropriate dependencies. When I tried building the first time the GRenderer was not defined, but after some digging around in visual studio it looked like I just needed to add the GRIFFEN define to the project settings player's defines.
So... there are two paths to take.
If you run into issues with v1.4.0 or want to use v1.5.1 then: If #2603 is merged then use this: The core Android build issue (I believe) is that there seems to be a template that includes the Start with commenting out those two lines in your gradle files to see if that gets you building your Android APK. Will be curious to see if that is all that was needed. 👍 |
Thank you @NoelStephensUnity. I will test now and get back to you if it works.
The other issue was the scene fading problem. |
Hello Daniel, could you please try updating the QoS package to 1.2.1? manifest.json:
|
@unity-ptrottier What versions of the different packages should we be using? I am using Unity 2021.3.22f1 and these are the versions of the packages related to this issue: After updating to QoS 1.2.1, it didn't fix the issue unfortunately. |
The scene fading issue, Android crash, or the Android build issue when using UTP v2.0.x and Collections v2.1.4? There have been a few mentioned so I just want to make sure we are tracking the right ones. |
@NoelStephensUnity Android crash, but the scene fading is still an issue. I followed your steps to fix the "Gradle Failed" error when building, but it still crashes when playing. Could you list all the versions you used? |
Ahh... the Android build issue should have only been specific to upgrading to 2022.3.3f1 (or higher) and it looks like you are using the original 2021 packages (i.e. pre UTP v2.x and Collections v2.x)/ I was using the "patch-in-progress" v1.5.1 version of NGO: Along with: Would you mind if we focus on fixing the android crash first? We can circle back to the scene fading issue (that will be an easier thing to figure out). Right now, let's make sure you can create an Android build that doesn't crash when using services QOS. If you use the above package versions (including the v1.5.1 patch-fix version), then can you build an android application package with no gradle failed errors? Apologies for the very lengthy delay in resolving this issue, it is a bit tricky all things considered. |
@NoelStephensUnity I copied my project files and updated the copy to 2022.3.1f1, but I hadn't updated to QoS 1.2.1. I just tested again though with the following versions, and the joining client still crashes:
There is an error message on the host when the other device joins (and crashes) that says there was an "invalid connection state".
Yes, it has unfortunately been quite frustrating. The game has 4.8 stars on Apple, but 4.2 stars on Google Play just because of this massive game-breaking bug. I can focus my full attention on fixing this for the rest of this weekend if you are available. Could we organize a Discord/Zoom meeting? |
@unity-ptrottier Were you ever able to reproduce the Android crashing on a test device? I am in contact with 2 players who have this issue and are eager to help fix it! |
@daniellochner |
@NoelStephensUnity How far along is this fix? |
It looks like something is holding it back still... Also, did you have any further information about the There are a few reasons why that message can appear but typically it is has an error before it and after it that will tell us what the issue is...but we haven't seen it specific to the QOS error this issue was originally filed under. |
@daniellochner
This error message typically means that there was a lower level network state mismatch. Since you are using relay that error you are getting on the host side should be expected if the clients connected suddenly crashed (i.e. the relay services has to time out...which then conveys the time out to your host...and between that time frame you could be trying to send messages to the clients that had already crashed...which would cause that error). The update to the collections package v1.5 should be coming soon...it is in the "release pipeline" (pretty much the last stage of a package release). I will post here when it completes the release process and is publicly available. |
@daniellochner |
@daniellochner
This will update you to NGO v1.6.0 (which has the NGO specific Android 32 bit crash fix in it). Let me know if this resolves your issue? |
@NoelStephensUnity I can't believe it but v1.6.0 ACTUALLY WORKED! Thank you for your work on getting it fixed -- very excited to finally get this update out to my community! Do you have any suggestions on fixing the scene fading? |
Glad to hear the v1.6.0 32bit fix worked for you. 👍
Being perfectly honest, I need to circle back and refresh myself on that issue. |
Hi there,
For some players, the game crashes when joining/creating a game when using an Android device.
Here is a link to a forum post in which others are experiencing the same issue:
https://forum.unity.com/threads/getting-a-lot-of-libil2cpp-so-crashes-in-android-build-after-implementing-unity-multiplayer.1401385/#post-9051061
I can recreate this myself on my own device using Bluestacks 4.
Unity: 2021.3.22f1
NGO: 1.3.1
Transport: 1.3.4
The text was updated successfully, but these errors were encountered: