Error Domain=com.spotify.sdk.login Code=1 "(null)"
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 25/100
- Issue type
- Bug
- Clarity
- Needs clarification
- Activity status
- Stale
- Tech stack
- ios, objective-c, swift
- Domain
- authentication, mobile-dev
Research direction
Start by tracing sessionManager.initiateSession(with:options:campaign:) through the Spotify iOS SDK to the ASWebAuthenticationSession call. Check how the presentation context is supplied and how the underlying AuthenticationServices error is handled. Done should mean the reported login failure is diagnosable and the authentication session has the required presentation context.
Written by the indexing model from the issue text.
Description
Took a bit of Swizzling, but I was finally able to transform Error Domain=com.spotify.sdk.login Code=1 "(null)" which occurs when trying to run the following:
let requestedScopes: SPTScope = [.userReadCurrentlyPlaying, .appRemoteControl]
sessionManager.initiateSession(with: requestedScopes, options: .default, campaign: nil)
Into the underlying error message that is being thrown by ASWebAuthenticationSession but then eaten by the Spotify SDK in this stack trace:
Error Domain=com.apple.AuthenticationServices.WebAuthenticationSession Code=2 "Cannot start ASWebAuthenticationSession without providing presentation context. Set presentationContextProvider before calling -start." UserInfo={NSDebugDescription=Cannot start ASWebAuthenticationSession without providing presentation context. Set presentationContextProvider before calling -start.}
I suspect that earlier on in the logic there's somewhere that's failing to determine that Spotify is installed and falling back to AuthenticationServices as a result. I'm currently looking to see if there's any way to hotfix the SDK to allow injection of an ASPresentationAnchor into the ASWebAuthenticationSession's instance.
- Dominant language
- Objective-C
- Stars
- 749
- Forks
- 206
- PR merge metrics
- No merged PRs in 30d
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from spotify/ios-sdk
-
ARM64e SupportOpen
Difficulty 5/5 Over a week Newbie friendliness 35/100
-
Mac CatalystOpen
Difficulty 5/5 Over a week Newbie friendliness 25/100
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
-
Difficulty 3/5 1-2 days Newbie friendliness 48/100
-
Difficulty 5/5 Over a week Newbie friendliness 25/100
Similar issues
-
[Pri] Low [Status] Ready for Dev [Type] Bug Blogging Prompts Notifications
Difficulty 2/5 1-3 hours Newbie friendliness 79/100
wordpress-mobile/WordPress-iOS#26256 · 1 comment ·
Maintainers usually reply within 1 day
-
"Announce route recalculation" is applied to the new-route prompt instead of the recalculation promptPossibly taken @vitaliy-sova-ios claimed this today. Openios-bugs voice prompts
Difficulty 2/5 1-3 hours Newbie friendliness 83/100
osmandapp/OsmAnd-iOS#6079 · 1 comment · 1 assignee ·
Maintainers usually reply within 1 day
-
bug
Difficulty 1/5 Under an hour Newbie friendliness 92/100
callstack/react-native-bottom-tabs#607 ·
Maintainers usually reply within 1 day
-
[Bug]: iOS textarea wraps text mid-word because LynxUIBaseInput hardcodes NSLineBreakByCharWrappingOpen
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
lynx-family/lynx#10455 ·
Maintainers usually reply within 1 day
-
api: analytics type: question
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
firebase/firebase-ios-sdk#16951 ·
Maintainers usually reply within 1 day