question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

TraktManager runTimeException on startAuth.

See original GitHub issue

Hi!

I got this crash belowe at TraktManager startAuth(). I think the problem, that the context provided by dagger is not an Activity, as this openid isssue suggests.

android.util.AndroidRuntimeException: Calling startActivity() from outside of an Activity context requires the FLAG_ACTIVITY_NEW_TASK flag. Is this really what you want? at android.app.ContextImpl.startActivity(ContextImpl.java:672) at android.app.ContextImpl.startActivity(ContextImpl.java:659) at android.content.ContextWrapper.startActivity(ContextWrapper.java:331) at net.openid.appauth.AuthorizationService.performAuthorizationRequest(AuthorizationService.java:222) at net.openid.appauth.AuthorizationService.performAuthorizationRequest(AuthorizationService.java:142) at me.banes.chris.tivi.trakt.TraktManager.startAuth(TraktManager.kt:85) at me.banes.chris.tivi.home.HomeFragmentViewModel.startAuthProcess(HomeFragmentViewModel.kt:65) at me.banes.chris.tivi.home.HomeFragmentViewModel.onLoginItemClicked(HomeFragmentViewModel.kt:61) at me.banes.chris.tivi.home.HomeFragment.onMenuItemClicked(HomeFragment.kt:71) at me.banes.chris.tivi.home.discover.DiscoverFragment$onViewCreated$$inlined$apply$lambda$1.onMenuItemClick(DiscoverFragment.kt:115)

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
fotixcommented, May 18, 2018

@chrisbanes , yes ofc you are right, i was refering to running the AppAuth on a different app but somehow i forgot i was on your repo instead of the AppAuth one.

0reactions
chrisbanescommented, May 18, 2018

Just to remind myself, this is due to https://github.com/openid/AppAuth-Android/issues/333

@fotix the min sdk is 23 so running on API 21/22 probably won’t work anyway

Read more comments on GitHub >

github_iconTop Results From Across the Web

Tivi is a work-in-progress TV show tracking Android app
Hi! I got this crash belowe at TraktManager startAuth(). I think the problem, that the context provided by dagger is not an Activity,...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found