-
Notifications
You must be signed in to change notification settings - Fork 249
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
amplify_auth_cognito - Intent crash with wc: type link - "This isn't a hierarchical URI." #4533
Comments
Hi @rhamnett, can you please provide more context and reproduction steps so we can better assist you? |
Hello thanks for the reply. The problem is that there are special wallet connect (wc: ) type URLs, like in the initial post. Cognito plugin seems to be trying to parse these when opening them from the Web via an intent. It should just have a check to ensure that the Uri is a type that can be parsed. I have again included a stack trace for you. If you want to recreate - have a plain project with amplify auth, then register the intent from the initial post. You can go to opesea.com - click login, then click wallet connect, find "m1nty" wallet, then click to open the app via the intent. Heres the culprit code in com.amazonaws.amplify.amplify_auth_cognito.AmplifyAuthCognitoPluginKt.getQueryParameters(AmplifyAuthCognitoPlugin.kt:546)
Causes
Stack trace....
|
Hi @rhamnett, thanks for the extra info. I've been able to reproduce this and I'm looking into a fix. We will provide an update here when we can, thanks. |
Ah brilliant. Thanks so much for taking the time to look into this. Really appreciate it |
@rhamnett no problem. I opened a PR that at least prevents the error, although not sure this will be the fix we end up using. Can you give it a try and see if it unblocks you? Add this to your pubspec.yaml: dependency_overrides:
amplify_auth_cognito:
git:
url: https://github.com/aws-amplify/amplify-flutter.git
ref: 8d8bc637502e0837a518d74b7700bf3ee61d6afd
path: packages/auth/amplify_auth_cognito |
Will be my pleasure. I'll try tomorrow and feed back. |
@Equartey just tried this, sorry.....please can you help me understand what versions I'll need to make this override work?
pubspec.yaml:
|
@rhamnett hm versions look good. Try |
Tried that I'm afraid, same error @Equartey flutter clean (flutter pub clean - is not a command) |
@rhamnett oh sorry about the typo. Not sure what the issue is yet, I'm not seeing that on my end. I'll give you an update when I have one. |
@Equartey no problem, could if be that your patch is from 1.7.0 not 1.7.1? ! amplify_auth_cognito 1.7.0 from git https://github.com/aws-amplify/amplify-flutter.git at 8d8bc6 in packages/auth/amplify_auth_cognito (overridden) |
Hi @rhamnett, I've made an update to my branch. Can you retry using this updated pubspec override? dependency_overrides:
amplify_auth_cognito:
git:
url: https://github.com/aws-amplify/amplify-flutter.git
ref: fix/auth-android-intent-uri-query-parsing
path: packages/auth/amplify_auth_cognito
amplify_auth_cognito_dart:
git:
url: https://github.com/aws-amplify/amplify-flutter.git
ref: fix/auth-android-intent-uri-query-parsing
path: packages/auth/amplify_auth_cognito_dart |
@Equartey thanks for the continued help, after a flutter clean :
|
@rhamnett hmm, can you try without the |
@Equartey |
@rhamnett awesome, happy to hear. Like I mentioned before, our approach may change, but we will update you here when its released. |
Hello just wondering if this got merged at any point or if I should keep my override. Thank you |
@rhamnett sorry for the delay. It has been merged and will be part of the next release. We'll update you here when that is available! |
This issue was addressed in Amplify Flutter v2 which was released a couple weeks ago. There were some breaking changes in this version. Please see the upgrade guide for more info. |
Description
Trying to open a wallet connect URL from the browser but getting an error when AmplifyAuthCognitoPlugin intercepts the intent.
wc:1de1069ddb4fb3406f82b7fe2dacb8dc487cc617c4cf48934867d372eaf7b460@2?relay-protocol=irn&symKey=6312c03106b30ffe780e97518d0f52b0d3724250918fa4ace0a0df38596963c7
Intent config:
Categories
Steps to Reproduce
No response
Screenshots
No response
Platforms
Flutter Version
3.13.9
Amplify Flutter Version
1.7.0
Deployment Method
Amplify CLI
Schema
No response
The text was updated successfully, but these errors were encountered: