Skip to content

Cannot get auth token with example app #240

@m-schmale

Description

@m-schmale

Hi,

Please take a look at the bug report below.

!! Attention !!
FILL IN ALL SECTIONS OF THIS TEMPLATE OR YOUR ISSUE WILL BE CLOSED WITHOUT INVESTIGATION
This is a flutter package that wraps the native iOS and Android Spotify "remote" SDKs as well as the Spotify Web Playback SDK for web. Since it wraps the native SDKs it has the same features and limitations. Please use the search functionality in the native SDK repos to find corresponding issues before opening an issue here. If your issue is deriving from the native SDKs you should open an issue there and not in this repo.

Is this a how to question?
No

Is this a native Spotify SDK issue?
No

Have you searched for existing issues?
Yes

Are you using a Free or Premium Spotify account?
Premium

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

Expected behavior
Get an auth token

Describe the bug
Callback is not working

Steps to Reproduce
Steps to reproduce the behavior:

  1. Install example app
  2. Press "get auth token"
  3. Login
  4. Now Chrome CustomTabs is stuck
  5. When I close Chrome CustomTabs I get this error:
I/Spotify Auth Client(20218): Spotify auth response: User cancelled
D/BrowserAuthHandler(20218): stop
I/com.spotify.sdk.android.auth.LoginActivity(20218): Spotify auth completing. The response is in EXTRA with key 'response'
I/flutter (20218): ┌───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────
I/flutter (20218): │ #0   SpotifySdk._logException (package:spotify_sdk/spotify_sdk.dart:655:15)
spotify_sdk.dart:655
I/flutter (20218): │ #1   SpotifySdk.getAccessToken (package:spotify_sdk/spotify_sdk.dart:131:7)
spotify_sdk.dart:131
I/flutter (20218): ├┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄
I/flutter (20218): │ ⛔ getAccessToken not implemented
I/flutter (20218): └───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────

Which is not an unexpected behavior since I cancelled it.
I can get an access token via Postman and the PKCE flow.

Screenshots
Not needed

Spotify_sdk Flutter package version
Check you pubspeck.lock file to verify the exact version [e.g 2.1, commit ID]

Flutter 3.35.2

spotify_sdk:
dependency: "direct main"
description:
path: ".."
relative: true
source: path
version: "3.0.2"

Target Platform, Version & Device

  • OS & Version: Android 16
  • Browser & Version (if applicable): Chrome 140.0.7339.155
  • Device: Pixel 6 Pro

Development OS

  • OS: Mac OS

Additional context
Please ask if anything is unclear

Regards
Mark

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions