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.

getInitialURL truncates any additional query parameters beyond the first

See original GitHub issue

Please 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.

  1. Setup a basic app
  2. Import Linking and log out results of getInitialURL()
  3. 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:open
  • Created 3 years ago
  • Reactions:10
  • Comments:18 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
stale[bot]commented, Jan 9, 2022

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.

1reaction
TikiTDOcommented, Jan 27, 2021

@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.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to get params from URI scheme of deep link in React ...
Try to change your config with this one: const linking = { prefixes: ["wagal://"], config: { screens:{ ResetPassword: "reset/password", } ...
Read more >
Request.Querystring is truncating parameters - MSDN
In an aspx page I have a C# script that pulls a query string paramter and sticks it ... Notice how the rest...
Read more >
Linking - Expo Documentation
getInitialURL () in Linking.parse() . Parses the deep link information out of the URL used to open the experience initially. If no link...
Read more >
Firebase dynamic link url parameters - Caritas Castellaneta
Shortening an URL with more than one parameters will result in truncation of parameters after theDynamic Link parameters; Debugging a URL; Next steps....
Read more >
Long query parameters are truncated, resulting in data loss
The length limit of any URL and query stem combination in Internet Explorer is 2048 characters. If the OnPremises SDC is being used,...
Read more >

github_iconTop Related Medium Post

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