getInitialURL truncates any additional query parameters beyond the first
See original GitHub issuePlease provide all the information requested. Issues that do not follow this format are likely to stall.
Description
Please provide a clear and concise description of what the bug is. Include screenshots if needed. Please test using the latest React Native release to make sure your issue has not already been fixed:
Given this url: myscheme://user/verification?confirm=1596497089568&email=person@gmail.com
getInitialURL gets a truncated path of myscheme://user/verification?confirm=1596497089568
.
Linking.addEventListener('url', (event)=> )
has this same problem. The event.url
is also truncated
React Native version:
Run react-native info
in your terminal and copy the results here.
System: OS: macOS 10.15.6 CPU: (8) x64 Intel® Core™ i7-4870HQ CPU @ 2.50GHz Memory: 589.46 MB / 16.00 GB Shell: 3.2.57 - /bin/bash Binaries: Node: 10.15.0 - /usr/local/bin/node Yarn: 1.22.4 - /usr/local/bin/yarn npm: 6.14.4 - /usr/local/bin/npm Watchman: 4.7.0 - /usr/local/bin/watchman Managers: CocoaPods: 1.9.1 - /usr/local/bin/pod SDKs: iOS SDK: Platforms: iOS 13.6, DriverKit 19.0, macOS 10.15, tvOS 13.4, watchOS 6.2 Android SDK: Not Found IDEs: Android Studio: 3.6 AI-192.7142.36.36.6241897 Xcode: 11.6/11E708 - /usr/bin/xcodebuild Languages: Java: 11.0.3 - /usr/bin/javac Python: 2.7.16 - /usr/bin/python npmPackages: @react-native-community/cli: Not Found react: 16.11.0 => 16.11.0 react-native: 0.62.2 => 0.62.2 npmGlobalPackages: react-native: Not Found
Steps To Reproduce
Provide a detailed list of steps that reproduce the issue.
- Setup a basic app
- Import Linking and log out results of
getInitialURL()
- Open the app with a deep link:
xcrun simctl openurl booted SCHEME://PAGE?one=1&two=2
Expected Results
Describe what you expected to happen.
I should get the full url and not a truncated version.
Snack, code example, screenshot, or link to a repository:
You can install the react-navigation sample application here: https://github.com/react-navigation/react-navigation/tree/main/example
Then use this deep link: xcrun simctl openurl booted rne://127.0.0.1:19000/--/simple-stack/Albums?one=1&two=2
Issue Analytics
- State:
- Created 3 years ago
- Reactions:10
- Comments:18 (5 by maintainers)
Hey there, it looks like there has been no activity on this issue recently. Has the issue been fixed, or does it still require the community’s attention? This issue may be closed if no further activity occurs. You may also label this issue as a “Discussion” or add it to the “Backlog” and I will leave it open. Thank you for your contributions.
@PiPoutch Most likely there’s multiple levels of parsing happening. When you pass something in quotes your shell is going to pass that string as a single argv to the callee. However if the callee happens to use that as an argument into something else, such as if adb passes it to a phone as a shell command, then it may end up doing that entire process a second time based on how that call is implemented.