Repository navigation
Fix CardScanGoogleLauncher attempting to reference unregistered launcher after PE is closed - #13261
Conversation
b0265f7 to
30c97cc
Compare
30c97cc to
47695fc
Compare
CardScanGoogleLauncher attempting to reference unregistered launcher after PE is closed
| } catch (_: IllegalStateException) { | ||
| deferredIntentSenderRequest = intentSenderRequest | ||
| } | ||
| } |
There was a problem hiding this comment.
There are a ton of other issues with this scanner is built that I need to be resolved. A lot of the work (fetching intent, checking availability) is being done in the composition scope of the Scan card button that should not be happening.
This PR fixes the initial crash but a good amount of follow-up work should be done. I'll open up tickets for these.
| onSuccess = { intentSenderRequest -> | ||
| eventsReporter.onCardScanStarted("google_pay") | ||
| activityLauncher.launch(intentSenderRequest, options) | ||
| launchIntentSenderOrDefer(intentSenderRequest) |
There was a problem hiding this comment.
Not a blocker, but I wonder if we could fix this with coroutines. We'd pass CoroutineScope from rememberCardScanGoogleLauncher to this class and await an activityLauncher on the main dispatcher
There was a problem hiding this comment.
In general, we should make this request in the view model scope rather than the composition scope, something I'll look to fix separately.
Summary
Fix
CardScanGoogleLauncherattempting to reference unregistered launcher and launch from it after PE is closed, resulting in anIllegalStateExceptioncrash.Motivation
RUN_MOBILESDK-5402
Testing