Closed joshuatantonflynn closed 5 years ago
This was working fine until two days ago.
Can you think of anything in your environment that has changed? I am not trying to shift blame, but I need to somehow try and track down the root cause. You are right, that stack trace will not help much :(
Any info you can give will be helpful.
Are you running this on a device or an emulator? Which device / emulator? Which iOS version? etc.....?
I've just looked into client->non-public members->_options and found the following values set to null Browser ClientSecret RedirectUri
But according to the documentation you don't need to set these. I definitely have the correct ID and Domain set
iPhone 7
Device or emulator? Please be specific. What about the iOS version?
Sorry, Device. 11.4
OK, I will give attention to this next week. It is 11 PM on a Friday over here.
Thanks for the info so far.
OK, I'll let you know if I solve the issue.
Looks like I figured it out. I went back through my git and saw after my colleague had merged with my code I had to change some iOS properties to get it to build (specifically supported Architectures). Looks like I had also changed Linker Behaviour to Link All. I was working on Droid after merging with him so it was back a few commits. Switched back to iOS and this bug was happening. So I switched the linker behaviour back to Link Framework SDKs Only. It now does not have this problem.
Thanks for the help.
This is great information and detective work, thank you @joshuatantonflynn
I will work with this information and see whether I can reproduce, and if so, I will update the docs accordingly to make users aware of this. Or perhaps see whether I can avoid the Linker removing the relevant code.
I define my client as follows:
Auth0Client client = new Auth0Client( new Auth0ClientOptions { Domain = ConstantsData.Auth0Domain, ClientId = ConstantsData.Auth0ClientId } );
var loginResults = await client.LoginAsync();
The System.NullReferenceException happens here. If I mouse over client, it clearly was defined and has data. Below is my Stack Trace as requested but I don't see how that well help you one bit.
The crash is clearly happening on external code (Auth0 code). This was working fine until two days ago. I downgraded to 1.0 and it still gave me this issue, I'm back on 2.1 now.