Fix app crash on invalid claim #2234

Closed
opened 2019-01-28 15:14:05 +01:00 by tzarebczan · 2 comments
tzarebczan commented 2019-01-28 15:14:05 +01:00 (Migrated from github.com)

The Issue

Someone created a claim with a # in it, and it crashes the app when accessing it. It may also crash when searching for the claim name/title (still confirming if this is the case).

   at parseURI (/Applications/LBRY.app/Contents/Resources/app.asar/node_modules/lbry-redux/dist/bundle.js:1715)
   at /Applications/LBRY.app/Contents/Resources/app.asar/node_modules/lbry-redux/dist/bundle.js:3337
   at /Applications/LBRY.app/Contents/Resources/app.asar/node_modules/lbry-redux/dist/bundle.js:3768
   at /Applications/LBRY.app/Contents/Resources/app.asar/node_modules/lbry-redux/dist/bundle.js:3728
   at /Applications/LBRY.app/Contents/Resources/app.asar/node_modules/lbry-redux/dist/bundle.js:3782
   at /Applications/LBRY.app/Contents/Resources/app.asar/node_modules/lbry-redux/dist/bundle.js:3728
   at Function.mapToProps (webpack:/src/renderer/component/fileTile/index.js:36)
   at mapToPropsProxy (/Applications/LBRY.app/Contents/Resources/app.asar/node_modules/react-redux/lib/connect/wrapMapToProps.js:54)
   at Function.detectFactoryAndVerify (/Applications/LBRY.app/Contents/Resources/app.asar/node_modules/react-redux/lib/connect/wrapMapToProps.js:63)
   at mapToPropsProxy (/Applications/LBRY.app/Contents/Resources/app.asar/node_modules/react-redux/lib/connect/wrapMapToProps.js:54)
   at handleFirstCall (/Applications/LBRY.app/Contents/Resources/app.asar/node_modules/react-redux/lib/connect/selectorFactory.js:37)
   at pureFinalPropsSelector (/Applications/LBRY.app/Contents/Resources/app.asar/node_modules/react-redux/lib/connect/selectorFactory.js:85)
   at Object.runComponentSelector [as run] (/Applications/LBRY.app/Contents/Resources/app.asar/node_modules/react-redux/lib/components/connectAdvanced.js:43)
   at Connect.initSelector (/Applications/LBRY.app/Contents/Resources/app.asar/node_modules/react-redux/lib/components/connectAdvanced.js:195)
   at new Connect (/Applications/LBRY.app/Contents/Resources/app.asar/node_modules/react-redux/lib/components/connectAdvanced.js:136)
   at constructClassInstance (/Applications/LBRY.app/Contents/Resources/app.asar/node_modules/react-dom/cjs/react-dom.development.js:11447)
   at updateClassComponent (/Applications/LBRY.app/Contents/Resources/app.asar/node_modules/react-dom/cjs/react-dom.development.js:13144)
   at beginWork (/Applications/LBRY.app/Contents/Resources/app.asar/node_modules/react-dom/cjs/react-dom.development.js:13824)
   at performUnitOfWork (/Applications/LBRY.app/Contents/Resources/app.asar/node_modules/react-dom/cjs/react-dom.development.js:15863)
   at workLoop (/Applications/LBRY.app/Contents/Resources/app.asar/node_modules/react-dom/cjs/react-dom.development.js:15902)
   at HTMLUnknownElement.callCallback (/Applications/LBRY.app/Contents/Resources/app.asar/node_modules/react-dom/cjs/react-dom.development.js:100)
   at Object.invokeGuardedCallbackDev (/Applications/LBRY.app/Contents/Resources/app.asar/node_modules/react-dom/cjs/react-dom.development.js:138)

From the reportee: This is because it erroneously treats the literal hashmark embedded in the name as the separator between name & claim id.

System Configuration

  • LBRY Daemon version:
  • LBRY App version:
  • LBRY Installation ID:
  • Operating system:

Anything Else

Screenshots

<!-- Thanks for reporting an issue to LBRY and helping us improve! To make it possible for us to help you, please fill out below information carefully. Before reporting any issues, please make sure that you're using the latest version. - App releases: https://github.com/lbryio/lbry-desktop/releases - Standalone daemon: https://github.com/lbryio/lbry/releases We are also available on live chat at https://chat.lbry.io --> ## The Issue Someone created a claim with a # in it, and it crashes the app when accessing it. It may also crash when searching for the claim name/title (still confirming if this is the case). ```/Applications/LBRY.app/Contents/Resources/app.asar/node_modules/react-redux/lib/components/connectAdvanced.js:258 Uncaught Error: Invalid claim ID 1bddb2858c145ae2e4ad0d8e8ce643d170b6e0c2#566baab8bffb3cb4cb90930f1fc13721c89bef87. at parseURI (/Applications/LBRY.app/Contents/Resources/app.asar/node_modules/lbry-redux/dist/bundle.js:1715) at /Applications/LBRY.app/Contents/Resources/app.asar/node_modules/lbry-redux/dist/bundle.js:3337 at /Applications/LBRY.app/Contents/Resources/app.asar/node_modules/lbry-redux/dist/bundle.js:3768 at /Applications/LBRY.app/Contents/Resources/app.asar/node_modules/lbry-redux/dist/bundle.js:3728 at /Applications/LBRY.app/Contents/Resources/app.asar/node_modules/lbry-redux/dist/bundle.js:3782 at /Applications/LBRY.app/Contents/Resources/app.asar/node_modules/lbry-redux/dist/bundle.js:3728 at Function.mapToProps (webpack:/src/renderer/component/fileTile/index.js:36) at mapToPropsProxy (/Applications/LBRY.app/Contents/Resources/app.asar/node_modules/react-redux/lib/connect/wrapMapToProps.js:54) at Function.detectFactoryAndVerify (/Applications/LBRY.app/Contents/Resources/app.asar/node_modules/react-redux/lib/connect/wrapMapToProps.js:63) at mapToPropsProxy (/Applications/LBRY.app/Contents/Resources/app.asar/node_modules/react-redux/lib/connect/wrapMapToProps.js:54) at handleFirstCall (/Applications/LBRY.app/Contents/Resources/app.asar/node_modules/react-redux/lib/connect/selectorFactory.js:37) at pureFinalPropsSelector (/Applications/LBRY.app/Contents/Resources/app.asar/node_modules/react-redux/lib/connect/selectorFactory.js:85) at Object.runComponentSelector [as run] (/Applications/LBRY.app/Contents/Resources/app.asar/node_modules/react-redux/lib/components/connectAdvanced.js:43) at Connect.initSelector (/Applications/LBRY.app/Contents/Resources/app.asar/node_modules/react-redux/lib/components/connectAdvanced.js:195) at new Connect (/Applications/LBRY.app/Contents/Resources/app.asar/node_modules/react-redux/lib/components/connectAdvanced.js:136) at constructClassInstance (/Applications/LBRY.app/Contents/Resources/app.asar/node_modules/react-dom/cjs/react-dom.development.js:11447) at updateClassComponent (/Applications/LBRY.app/Contents/Resources/app.asar/node_modules/react-dom/cjs/react-dom.development.js:13144) at beginWork (/Applications/LBRY.app/Contents/Resources/app.asar/node_modules/react-dom/cjs/react-dom.development.js:13824) at performUnitOfWork (/Applications/LBRY.app/Contents/Resources/app.asar/node_modules/react-dom/cjs/react-dom.development.js:15863) at workLoop (/Applications/LBRY.app/Contents/Resources/app.asar/node_modules/react-dom/cjs/react-dom.development.js:15902) at HTMLUnknownElement.callCallback (/Applications/LBRY.app/Contents/Resources/app.asar/node_modules/react-dom/cjs/react-dom.development.js:100) at Object.invokeGuardedCallbackDev (/Applications/LBRY.app/Contents/Resources/app.asar/node_modules/react-dom/cjs/react-dom.development.js:138) ``` From the reportee: This is because it erroneously treats the literal hashmark embedded in the name as the separator between name & claim id. ## System Configuration <!-- For the app, this info is in the About section at the bottom of the Help page. You can include a screenshot instead of typing it out --> <!-- For the daemon, run: curl 'http://localhost:5279' --data '{"method":"version"}' and include the full output --> - LBRY Daemon version: - LBRY App version: - LBRY Installation ID: - Operating system: ## Anything Else <!-- Include anything else that does not fit into the above sections --> ## Screenshots <!-- If a screenshot would help explain the bug, please include one or two here -->
neb-b commented 2019-01-28 19:00:26 +01:00 (Migrated from github.com)
  • Searching works
  • Trying to navigate directly to the url works lbry://name#x#x shows a snackbar with Invalid LBRY URL entered. Only A-Z, a-z, and - allowed.

I think the only thing that would be broken is if it's your own claim? Still trying to test.

- Searching works - Trying to navigate directly to the url works `lbry://name#x#x` shows a snackbar with `Invalid LBRY URL entered. Only A-Z, a-z, and - allowed.` I think the only thing that would be broken is if it's your own claim? Still trying to test.
tzarebczan commented 2019-09-04 04:29:54 +02:00 (Migrated from github.com)

Doesn't seem reproducible, closing for now.

Doesn't seem reproducible, closing for now.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: LBRYCommunity/lbry-desktop#2234
No description provided.