Hey guys! We are using RudderStack with Unity and ...
# support
r
Hey guys! We are using RudderStack with Unity and Crashlytics to collect data to our system and we have implemented it like the setup tell us to do. We are facing some errors that I wanted to share with you to know if it's something easy to fix: • Recently we have noticed that we are having a lot of error messages between scenes related to "RudderStack.Unity.RSScreenViewEvents.OnSceneLoaded". Is there a way to avoid it? • Another error that we are facing is a little bit strange related to "RudderStack.Unity.RSAnalytics.FetchConfig", something related to "NameResolutionFailure" rightly after the session starts, it gave us this error but looks like everything is working fine, so at first moment don't know what could be; • Crashlytics also has catched something related to "RudderStack.Unity.Utility.RSStorageManager.LoadFromFile", that throws and exception "Exception : Unknown action of type <> was stored!", and the same as above, everything looks working fine, so don't know what could be happening unfortunetly; • Oh and also, is there any way for RudderStack to handle data offline? Or is it necessary to create a custom code in this case?
m
Hey There! 👋 Your message has been received by the RudderStack team. Our standard customer support hours are 9-6 PM EST, but we will forward this request to your Technical Account Manager, and they will get back to you shortly. Please use the thread for any additional comments.
Hi Lucas, are you using the unity SDK V1 or V2?
Also can you share the error logs?
r
Hi Ranganath! We are using Unity SDK V2. I will share with you the log erros from Crashlytics! All of our tests are from Android devices. 0_RudderStack.Unity.RSAnalytics.FetchConfig - Getting this one everytime we enter the application; 1_RudderStack.Unity.RSScreenViewEvents.OnSceneLoaded - Getting this one on every scene change; 2_RudderStack.Unity.Utility.RSStorageManager.LoadFromFile - Rarely getting this one but we don't have sure of what could cause it.
Oh, and I have another question... Do Android and iOS sources work for Unity implementation? Or only the Unity source?
I was digging around and doing some testing and it looks like these errors start from the first message I get as soon as I call the RSAnalytics.Initialize function on Android devices... an error about "SocketException: The requested address is not valid in this context" I was also trying with the GitHub project https://github.com/rudderlabs/rudder-sdk-unity-v2 and the same error has occured when built an APK for Android... on Unity it looks like everything is working fine with the logs and Initialization
m
No the Android and iOS sources will not work properly with the Unity Implementation. Yes but why are you not using an Android source for your Android implementation?
r
It's because I'm using only Unity to make Android Builds, so I thought that only needed to set a Unity source. After some struggling I've managed to correctly initialize RudderStack on a Unity Android APK, but only using Unity SDK V2 release v1.0.0!
I'm just having some trouble related to OneSignal destination using Unity source... I could correctly identify the user but a I cannot send any Track event. I'm receiving "App is limited to a maximum of 3 tags on a given player" on every try. I'm using the following code to Identify and send the Track event.
Copy code
RSAnalytics.Client.Identify(userID.text,
                new Dictionary<string, object> { { "email", "test1@example.com" }, { "name", "Test" }, { "gender", "Male" }, { "language", "Portuguese" }, { "play_language", "English" } });

RSAnalytics.Client.Track(
                userID.text,
                eventName.text,
                new Dictionary<string, object> { { propertyType.text, propertyValue.text } }
            );
Is there anything that I could be doing wrong?
m
Hi Lucas, why are you sending the userId in the track call. If you send it in an identify call, it is automatically added to subsequent track calls. Checkout the track syntax here
r
Actually this is a code from Unity SDK V2 release 1.0.0, unfortunetly was the only one that I've managed to make it to initialize with Unity Android build. The latest and previous Unity SDK Releases were getting me an error rightly after I call the Initialize method... something related to "NameResolutionFailure" and "SocketException: The requested address is not valid in this context". The method is being called like the refference image. I've tried with Unity source key and even with an Android source key just to check if there was any type of missunderstood with the keys in my mind... but none of them worked... Is there a chance that on the latest release, the Initialization method has some kind of bug with Unity Android builds?
m
Oh ok let me check if the team can help?
Hi Lucas, can you share your workspace Id (or your data-plane url and writeKey for the source), the team needs these details to try and reproduce the error. You can DM me if you don't wish to share it here.
r
Hi Ranganath! Off course! I'll share with you those informations in private because is a private project ok? Let me know if there's anything else you need!
m
Thanks, I got it.
r
Hi Ranganath! Any updates from the team referred to the tests?
m
I should be able to provide an update by EOD tomorrow
r
Perfect! Thanks!
Hi Ranganath! Any news from the team?
m
Hi Lucas the team has acknowledged the issue and is working on a fix which should be out in the next sprint (next couple of weeks)
r
Very Thanks Ranganath! I'll keep an eye on Product-Releases channel for when the sprint releases!
m
Hey Lucas, quick correction here, the team is working on understanding the issue and will conclude whether it is a bug or not once they complete their research. Following that the team will take a call on how to move forward on this
r
Hi Ranganath! Does the time has some news?
m
Hi Lucas there is no update on this and the team is still researching it.
g
Hi,, I think we are facing same issue,, any updates?
m
Will look into this again
g
I just checked with the our team ,, they already fixed the issues,, they are bugs in the SDK itself .. one of them is related that some code do expect internet connection, even though offline is later handled. one of them is related to turning stripping off for iOS ( or something like that )
m
Oh ok. I will update the team. Thanks for sharing the issue.