You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Router ignores deeplink URL part after #: http://baseUrl/#token=xyz #80666
P2Important issues not at the top of the work listengineflutter/engine related. See also e: labels.f: routesNavigator, Router, and related APIs.found in release: 2.1Found to occur in 2.1frameworkflutter/packages/flutter repository. See also f: labels.has reproducible stepsThe issue has been confirmed reproducible and is ready to work onplatform-androidAndroid applications specificallyplatform-iosiOS applications specifically
I am using Navigator 2.0/Router. parseRouteInformation from RouteInformationParser ignores everything after a #. My backend (supabase) provides tokens via a URL with /#token=xyz.
changed the title [-]Router ignores URL part after #: http://baseUrl/#token=xyz[/-][+]Router ignores URL part after #: http://baseUrl/#token=xyz on Android[/+]on Apr 18, 2021
adb shell am start -a android.intent.action.VIEW -c android.intent.category.BROWSABLE -d "http://test-deeplink-url-fragment.com/#testFragment"
The issue seems to be caused by the #. If you remove it then the argument is passes properly.
Example: this url works: adb shell am start -a android.intent.action.VIEW -c android.intent.category.BROWSABLE -d "http://test-deeplink-url-fragment.com/testFragment=0"
flutter doctor -v
[✓] Flutter (Channel stable, 2.0.5, on macOS 11.2.3 20D91 darwin-x64, locale en-AO)
• Flutter version 2.0.5 at /Users/pedromassango/Code/flutter_stable
• Framework revision adc687823a (3 days ago), 2021-04-16 09:40:20 -0700
• Engine revision b09f014e96
• Dart version 2.12.3
[✓] Android toolchain - develop for Android devices (Android SDK version 30.0.2)
• Android SDK at /Users/pedromassango/Library/Android/sdk
• Platform android-30, build-tools 30.0.2
• ANDROID_HOME = /Users/pedromassango/Library/Android/sdk
• Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java
• Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6915495)
• All Android licenses accepted.
[!] Xcode - develop for iOS and macOS
• Xcode at /Applications/Xcode.app/Contents/Developer
• Xcode 12.4, Build version 12D4e
! CocoaPods 1.9.3 out of date (1.10.0 is recommended).
CocoaPods is used to retrieve the iOS and macOS platform side's plugin code that responds to your plugin usage on the Dart side. Without CocoaPods, plugins will not work on iOS or macOS. For more info, see https://flutter.dev/platform-plugins To upgrade see https://guides.cocoapods.org/using/getting-started.html#installation for instructions.[✓] Chrome - develop for the web • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome[✓] Android Studio (version 4.1) • Android Studio at /Applications/Android Studio.app/Contents • Flutter plugin can be installed from: 🔨 https://plugins.jetbrains.com/plugin/9212-flutter • Dart plugin can be installed from: 🔨 https://plugins.jetbrains.com/plugin/6351-dart • Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6915495)[✓] IntelliJ IDEA Community Edition (version 2021.1) • IntelliJ at /Applications/IntelliJ IDEA CE.app • Flutter plugin version 55.1.5 • Dart plugin version 211.6693.108[✓] VS Code (version 1.55.1) • VS Code at /Applications/Visual Studio Code.app/Contents • Flutter extension version 3.16.0[✓] Connected device (3 available) • sdk gphone x86 64 (mobile) • emulator-5554 • android-x64 • Android 11 (API 30) (emulator) • macOS (desktop) • macos • darwin-x64 • macOS 11.2.3 20D91 darwin-x64 • Chrome (web) • chrome • web-javascript • Google Chrome 89.0.4389.128! Doctor found issues in 1 category.
changed the title [-]Router ignores URL part after #: http://baseUrl/#token=xyz on Android[/-][+]Router ignores deeplink URL part after #: http://baseUrl/#token=xyz on Android [/+]on Apr 19, 2021
changed the title [-]Router ignores deeplink URL part after #: http://baseUrl/#token=xyz on Android [/-][+]Router ignores deeplink URL part after #: http://baseUrl/#token=xyz [/+]on Apr 22, 2021
This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of flutter doctor -v and a minimal reproduction of the issue.
P2Important issues not at the top of the work listengineflutter/engine related. See also e: labels.f: routesNavigator, Router, and related APIs.found in release: 2.1Found to occur in 2.1frameworkflutter/packages/flutter repository. See also f: labels.has reproducible stepsThe issue has been confirmed reproducible and is ready to work onplatform-androidAndroid applications specificallyplatform-iosiOS applications specifically
Activity
iapicca commentedon Apr 18, 2021
@nstrelow
can you provide your
flutter doctor -v, yourflutter run -d chrome -vand a minimal reproducible code sample without 3rd party pluginsnstrelow commentedon Apr 18, 2021
Hehe, tried to make an failing example and got a working one for web
Web is working using the baseUrl/#/#testFragment notation.
But Android is still not working and stripping #testFragement when using deeplinks. Will upload example code shortly.
[-]Router ignores URL part after #: http://baseUrl/#token=xyz[/-][+]Router ignores URL part after #: http://baseUrl/#token=xyz on Android[/+]nstrelow commentedon Apr 18, 2021
Minimal example for Android Deeplink stripping away URL fragment
baseUrl/#something: https://github.com/nstrelow/flutter_failing_fragment_deeplinkRun example on Android and execute this:
pedromassangocode commentedon Apr 19, 2021
The issue seems to be caused by the
#. If you remove it then the argument is passes properly.Example: this url works:
adb shell am start -a android.intent.action.VIEW -c android.intent.category.BROWSABLE -d "http://test-deeplink-url-fragment.com/testFragment=0"flutter doctor -v
[✓] Flutter (Channel stable, 2.0.5, on macOS 11.2.3 20D91 darwin-x64, locale en-AO) • Flutter version 2.0.5 at /Users/pedromassango/Code/flutter_stable • Framework revision adc687823a (3 days ago), 2021-04-16 09:40:20 -0700 • Engine revision b09f014e96 • Dart version 2.12.3 [✓] Android toolchain - develop for Android devices (Android SDK version 30.0.2) • Android SDK at /Users/pedromassango/Library/Android/sdk • Platform android-30, build-tools 30.0.2 • ANDROID_HOME = /Users/pedromassango/Library/Android/sdk • Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java • Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6915495) • All Android licenses accepted. [!] Xcode - develop for iOS and macOS • Xcode at /Applications/Xcode.app/Contents/Developer • Xcode 12.4, Build version 12D4e ! CocoaPods 1.9.3 out of date (1.10.0 is recommended). CocoaPods is used to retrieve the iOS and macOS platform side's plugin code that responds to your plugin usage on the Dart side. Without CocoaPods, plugins will not work on iOS or macOS. For more info, see https://flutter.dev/platform-plugins To upgrade see https://guides.cocoapods.org/using/getting-started.html#installation for instructions. [✓] Chrome - develop for the web • Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome [✓] Android Studio (version 4.1) • Android Studio at /Applications/Android Studio.app/Contents • Flutter plugin can be installed from: 🔨 https://plugins.jetbrains.com/plugin/9212-flutter • Dart plugin can be installed from: 🔨 https://plugins.jetbrains.com/plugin/6351-dart • Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6915495) [✓] IntelliJ IDEA Community Edition (version 2021.1) • IntelliJ at /Applications/IntelliJ IDEA CE.app • Flutter plugin version 55.1.5 • Dart plugin version 211.6693.108 [✓] VS Code (version 1.55.1) • VS Code at /Applications/Visual Studio Code.app/Contents • Flutter extension version 3.16.0 [✓] Connected device (3 available) • sdk gphone x86 64 (mobile) • emulator-5554 • android-x64 • Android 11 (API 30) (emulator) • macOS (desktop) • macos • darwin-x64 • macOS 11.2.3 20D91 darwin-x64 • Chrome (web) • chrome • web-javascript • Google Chrome 89.0.4389.128 ! Doctor found issues in 1 category.[-]Router ignores URL part after #: http://baseUrl/#token=xyz on Android[/-][+]Router ignores deeplink URL part after #: http://baseUrl/#token=xyz on Android [/+]nstrelow commentedon Apr 19, 2021
@pedromassango Yes, the problem is the #.
But my backend (supabase) returns URLs in this format, which I do not have control over.
Also URI fragments are actually used in client applications.
It's just unfortunate that Android does strip it away, but web doesn't.
goderbauer commentedon Apr 21, 2021
/cc @chunhtai Do you know why we would ignore the fragment?
chunhtai commentedon Apr 21, 2021
Yes we forgot to include the URI fragment, it is the same thing for iOS as well.
[-]Router ignores deeplink URL part after #: http://baseUrl/#token=xyz on Android [/-][+]Router ignores deeplink URL part after #: http://baseUrl/#token=xyz [/+]nstrelow commentedon May 8, 2021
Friendly grateful bump.
Or some pointers where that piece of code lies around? Could try to fix it and make a PR
chunhtai commentedon May 10, 2021
Sorry, I am currently busy with other thing. If you are interested, here is the relevant code:
android
https://github.com/flutter/engine/blob/3b26a42ad4399083a62679a9e8208c3ddeda1725/shell/platform/android/io/flutter/embedding/android/FlutterActivityAndFragmentDelegate.java#L398
ios
https://github.com/flutter/engine/blob/3b26a42ad4399083a62679a9e8208c3ddeda1725/shell/platform/darwin/ios/framework/Source/FlutterAppDelegate.mm#L162
github-actions commentedon Jul 30, 2021
This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of
flutter doctor -vand a minimal reproduction of the issue.