pln-planning-tools / Starmap

Roadmap Planning Tool
https://starmap.site
Other
20 stars 8 forks source link

bug: Uncaught (in promise) Error: Unsupported URL: https://github.com/issues/ #372

Closed SgtPooki closed 1 year ago

SgtPooki commented 1 year ago

reported in slack

problem url: https://starmap.site/roadmap/github.com/filecoin-station/roadmap/issues/1

paramsFromUrl.ts:17 Uncaught (in promise) Error: Unsupported URL: https://github.com/issues/
    at s (paramsFromUrl.ts:17:11)
    at [...slug].tsx:147:45
    at s (runtime.js:45:40)
    at Generator._invoke (runtime.js:274:22)
    at forEach.e.<computed> [as next] (runtime.js:97:21)
    at n (asyncToGenerator.js:3:20)
    at s (asyncToGenerator.js:25:9)
    at asyncToGenerator.js:32:7
    at new Promise (<anonymous>)
    at asyncToGenerator.js:21:12

image

source:

SgtPooki commented 1 year ago

I attempted to load this URL, got a successfully rendered roadmap, and then refreshed and it succeeded again.

I removed my “debug” item in localStorage and reloaded, and got the same error as reported; investigating now.

SgtPooki commented 1 year ago

it seems like the children of https://github.com/filecoin-station/roadmap/issues/12 are not being recognized properly.

SgtPooki commented 1 year ago

The children parsing logic was failing on parsing a linePiece that was equal to ### due to:

https://github.com/pln-planning-tools/Starmap/blob/be391028ce5d1cedb0ebe6015417f6a83d849b45/lib/getValidUrlFromInput.ts#L1-L22

returning https://github.com/issues/## when called by

https://github.com/pln-planning-tools/Starmap/blob/be391028ce5d1cedb0ebe6015417f6a83d849b45/lib/parser.ts#L94