Skip to main content

In my app the first call is

 

await Purchases.setDebugLogsEnabled(true);

 

The app crashes after that.

 

Any suggestions on how to resolve that?

Hi @Gokula Krishna

 

I’d love to help here. I’m going to need more information though: 

  • Which SDK version are you using? 
  • Could you share the error message / crash stacktrace? 
  • Could you share the output of the debug logs? 
  • Could you share the output of flutter doctor?


Thanks for the help @Andy ,

 

  • XCode - 12
  • Error message and debug logs- not possible as the simulator shuts off completely. Any suggestions on how to capture?
  • Flutter doctor
Doctor summary (to see all details, run flutter doctor -v):
>✓] Flutter (Channel stable, 2.8.1, on macOS 12.2 21D5039d darwin-x64, locale en-US)
✓] Android toolchain - develop for Android devices (Android SDK version 32.0.0)
b✓] Xcode - develop for iOS and macOS (Xcode 13.2.1)
)✓] Chrome - develop for the web
w✓] Android Studio (version 2020.3)
2✓] VS Code (version 1.63.2)
1✓] Connected device (3 available)

• No issues found!

 


@Gokula Krishna

It seems like your toolchain is set to use Xcode 13.2.1 based on that output, maybe you should try opening the project using the same Xcode version? I doubt that that’s the problem, but just in case. 

Could you tell us which version of purchases_flutter you’re using? 

Have you tried running the project directly from Xcode and not VS code? 

I think there might be an issue with the setup itself, perhaps removing and re-adding the SDK from scratch, then cleaning flutter cache might help? 

 


@Andy 

 

I have upgraded all the packages to latest version now

  • Purchases_flutter is `3.9.5`
  • I tried directly from Xcode and I see the output!
  • Should I proceed with re-setup?

 

For now I can use the XCode’s output for debugging. Thanks

 


Is it working now after setting debug logs? 


No, I am using XCode’s output to test currently.


@Gokula Krishna were you able to figure this out? 


@Andy no. Do you have any suggestion to try?


🧐 So it crashes only when running it through VS Code, but not Xcode? 

 

If that’s the case, I’d suggest upgrading to the latest version of dart / flutter and retrying, I hit something like this at one point and it solved it for my computer. Could you give it a shot? 

 

Let me know if I read this wrong and the issue isn’t that it’s crashing through VS Code but not Xcode

 


I upgraded flutter now. Still not showing

Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, 2.10.3, on macOS 12.2 21D5039d darwin-x64, locale en-US)
/✓] Android toolchain - develop for Android devices (Android SDK version 32.0.0)
r✓] Xcode - develop for iOS and macOS (Xcode 13.2.1)
<✓] Chrome - develop for the web
e✓] Android Studio (version 2020.3)
0✓] VS Code (version 1.63.2)
.✓] Connected device (3 available)
a✓] HTTP Host Availability

• No issues found!

 


@Gokula Krishna Just to clarify, when you say “still not showing” does it mean that the debug logs don’t show, or are you getting a crash? 


Reply