brim-borium / spotify_sdk

Flutter Package to connect the spotify sdk
https://pub.dev/packages/spotify_sdk
Apache License 2.0
152 stars 82 forks source link

Null pointer exception when calling Disconnect #200

Open MitchVonBrumen opened 1 year ago

MitchVonBrumen commented 1 year ago

Is this a how to question? No If Yes, please use Stack Overflow instead.

Is this a native Spotify SDK issue? No

Have you searched for existing issues? Yes

Are you using a Free or Premium Spotify account? Free

Are you aware of the limitations of Free Spotify accounts? Yes

Expected behavior User is disconnected from Spotify when disconnect method is called.

Describe the bug Got a java null pointer exception when calling disconnect

Steps to Reproduce

  1. Log in the user
  2. Call disconnect
  3. See error: Error while deleting user: PlatformException(error, null, null, java.lang.NullPointerException I/flutter (18388): at de.minimalme.spotify_sdk.SpotifySdkPlugin.disconnectFromSpotify(SpotifySdkPlugin.kt:349) I/flutter (18388): at de.minimalme.spotify_sdk.SpotifySdkPlugin.onMethodCall(SpotifySdkPlugin.kt:177) I/flutter (18388): at io.flutter.plugin.common.MethodChannel$IncomingMethodCallHandler.onMessage(MethodChannel.java:258)

Spotify_sdk Flutter package version 2.3.1

Target Platform, Version & Device

Development OS Windows