Owstin / scrambow

Puzzle Scramble Generator
14 stars 6 forks source link

scrambler.get() returns different output in `next start` mode #28

Closed pandanoir closed 1 year ago

pandanoir commented 1 year ago

minimum repo: https://github.com/pandanoir/report-scrambow-error

I'm using Next.js 13 and face a bug of scrambow.

Scrambow returns an expected value in npm run dev(next dev), but it returns a wrong value in npm run start(next start).

expected:
[{scramble_string: "D' F2 U  R2 B2 R2 D  L2 U  L2 F2 R2 F' D' R  U' R' B  F' L  "}]
actual:
[{scramble_string: "U' "}]

I think some feature used by scrambow is transpiled by Next.js or TypeScript and then scrambow returns a wrong value. I've read some code of scrambow, but I didn't get it. Could you inspect the bug?

pandanoir commented 1 year ago

maybe, only the last char is shown in next start.

pandanoir commented 1 year ago

I found that below code are transpiled into y = rx[rv[R][r.move[S]]] + " "; (+= is replaced with =). However, I didn't find which tool does it.

https://github.com/Owstin/scrambow/blob/69e2863b032dcd4d9357cd90a444cd33d59393a8/src/scramblers/333/base.js#L1152-L1153

pandanoir commented 1 year ago

I got that it isn't scrambow's matter. I'll report this to other repository.

pandanoir commented 1 year ago

I created https://github.com/vercel/next.js/issues/44445 so I'll close this issue.