-
Notifications
You must be signed in to change notification settings - Fork 22
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
in maui, android, getting nullreference exception when creating ablyRest and AblyRealtime in Release #1241
Comments
➤ Automation for Jira commented: The link to the corresponding Jira issue is https://ably.atlassian.net/browse/SDK-3656 |
Hey, ideally it should work if it's working in debug mode. Can you post the full code snippet and full error log? |
For more information, you can take a look at this issue #1205 |
I had a hunch but now it seems it might be clear why app doesn't work in release mode. It seems some level of assembly stripping must be happening in release mode. You can check this thread -> #764 (comment). You should disable assembly trimming for @kjetil-gdm Let me know if this configuration works for you. |
Thanks sac007,
|
@kjetil-gdm Great! Feel free to raise more issues if you face any problems in the future : ) |
Code:
var options = new ClientOptions();
options.Key = "[apikey with Channel Metadata, History, Presence, Publish, Statistics, Subscribe]";
options.AutomaticNetworkStateMonitoring = false;
AblyRest ably_client_rest = new AblyRest(options);
This works in debug mode (debugging on actual Android device).
When built for Release (and testing on actual device) it causes the following exception:
"Object reference not st to an instance of an object".
Tracke: at IO.Ably.IoC.get_MobileDevice())
at IO.Ably.AblyRest...ctor(ClientOptions)
...
Creating AblyRealtime causes the same issue.
ably.io version 1.2.11,
target .net runtime: 7.0
maui
Am I missing a permission something, seeing how this works in debug but not release?
The text was updated successfully, but these errors were encountered: