Skip to content
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

URIError: URI malformed #120

Open
MrOrz opened this issue Dec 27, 2018 · 2 comments
Open

URIError: URI malformed #120

MrOrz opened this issue Dec 27, 2018 · 2 comments

Comments

@MrOrz
Copy link
Member

MrOrz commented Dec 27, 2018

View details in Rollbar: https://rollbar.com/mrorz/rumors-line-bot/items/122/


URIError: URI malformed
  File "<anonymous>", line unknown, in encodeURI
  File "/app/build/handlers/askingReplyFeedback.js", line 87, in <unknown>
                uri: `line://msg/text/?${encodeURI(sharedText)}`
  File "<anonymous>", line unknown, in Generator.next
  File "/app/build/handlers/askingReplyFeedback.js", line 19, in step
    function _asyncToGenerator(fn) { return function () { var gen = fn.apply(this, arguments); return new Promise(function (resolve, reject) { function step(key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { return Promise.resolve(value).then(function (value) { step("next", value); }, function (err) { step("throw", err); }); } } return step("next"); }); }; }
  File "/app/build/handlers/askingReplyFeedback.js", line 19, in <unknown>
    function _asyncToGenerator(fn) { return function () { var gen = fn.apply(this, arguments); return new Promise(function (resolve, reject) { function step(key, arg) { try { var info = gen[key](arg); var value = info.value; } catch (error) { reject(error); return; } if (info.done) { resolve(value); } else { return Promise.resolve(value).then(function (value) { step("next", value); }, function (err) { step("throw", err); }); } } return step("next"); }); }; }
  File "<anonymous>", line unknown, in <unknown>
  File "internal/process/next_tick.js", line 228, in process._tickDomainCallback
@MrOrz
Copy link
Member Author

MrOrz commented Dec 27, 2018

Using encodeURIComponent should do the job, since all text should be encoded in this case

@MrOrz
Copy link
Member Author

MrOrz commented Dec 27, 2018

Need to investigate if it has something to do with high-low pair
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/encodeURIComponent

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant