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

RangeError: Invalid string length #895

Open
janpio opened this issue Mar 30, 2022 · 7 comments
Open

RangeError: Invalid string length #895

janpio opened this issue Mar 30, 2022 · 7 comments
Labels
bug/2-confirmed Bug has been reproduced and confirmed. kind/bug A reported bug. topic: Invalid string length

Comments

@janpio
Copy link
Contributor

janpio commented Mar 30, 2022

  1. Prisma version (prisma -v or npx prisma -v):

Checkout of Studio-Code repository

  1. Logs from Developer Tools Console or Command line, if any:
[vite] connecting...
BootstrapStore.ts:31 Studio version 0.458.0
BootstrapStore.ts:185 RangeError: Invalid string length
    at JSON.stringify (<anonymous>)
    at Script.serialize (src/stores/script/Script.ts:173:20)
    at Script.update (src/stores/base/BaseListItem.ts:23:27)
    at executeAction (node_modules/.vite/chunk-TBMQ2Y3I.js?v=04cb37f7:752:15)
    at Script.update (node_modules/.vite/chunk-TBMQ2Y3I.js?v=04cb37f7:739:12)
    at Script.update (src/stores/script/Script.ts:164:13)
    at executeAction (node_modules/.vite/chunk-TBMQ2Y3I.js?v=04cb37f7:752:15)
    at Script.update (node_modules/.vite/chunk-TBMQ2Y3I.js?v=04cb37f7:739:12)
    at src/stores/bootstrap/BootstrapStore.ts:101:38
    at Array.forEach (<anonymous>)
init @ BootstrapStore.ts:185
react-dom.development.js:88 Warning: componentWillReceiveProps has been renamed, and is not recommended for use. See https://fb.me/react-unsafe-component-lifecycles for details.

* Move data fetching code or side effects to componentDidUpdate.
* If you're updating state whenever props change, refactor your code to use memoization techniques or move it to static getDerivedStateFromProps. Learn more at: https://fb.me/react-derived-state
* Rename componentWillReceiveProps to UNSAFE_componentWillReceiveProps to suppress this warning in non-strict mode. In React 17.x, only the UNSAFE_ name will work. To rename all deprecated lifecycles to their new names, you can run `npx react-codemod rename-unsafe-lifecycles` in your project source folder.

Please update the following components: Modal
printWarning @ react-dom.development.js:88
createError.ts:50 [BootstrapStore.init] Studio bootstrap failed Object
createError @ createError.ts:50
createError.ts:51 RangeError: Invalid string length
    at JSON.stringify (<anonymous>)
    at Script.serialize (src/stores/script/Script.ts:173:20)
    at Script.update (src/stores/base/BaseListItem.ts:23:27)
    at executeAction (node_modules/.vite/chunk-TBMQ2Y3I.js?v=04cb37f7:752:15)
    at Script.update (node_modules/.vite/chunk-TBMQ2Y3I.js?v=04cb37f7:739:12)
    at Script.update (src/stores/script/Script.ts:164:13)
    at executeAction (node_modules/.vite/chunk-TBMQ2Y3I.js?v=04cb37f7:752:15)
    at Script.update (node_modules/.vite/chunk-TBMQ2Y3I.js?v=04cb37f7:739:12)
    at src/stores/bootstrap/BootstrapStore.ts:101:38
    at Array.forEach (<anonymous>)
createError @ createError.ts:51
BootstrapStore.ts:213 Uncaught (in promise) StudioError

image

Invalid string length
RangeError: Invalid string length
    at JSON.stringify (<anonymous>)
    at Script.serialize (https://3001-prisma-studiocode-oap8wu2yudj.ws-eu38.gitpod.io/src/stores/script/Script.ts:173:20)
    at Script.update (https://3001-prisma-studiocode-oap8wu2yudj.ws-eu38.gitpod.io/src/stores/base/BaseListItem.ts:23:27)
    at executeAction (https://3001-prisma-studiocode-oap8wu2yudj.ws-eu38.gitpod.io/node_modules/.vite/chunk-TBMQ2Y3I.js?v=04cb37f7:752:15)
    at Script.update (https://3001-prisma-studiocode-oap8wu2yudj.ws-eu38.gitpod.io/node_modules/.vite/chunk-TBMQ2Y3I.js?v=04cb37f7:739:12)
    at Script.update (https://3001-prisma-studiocode-oap8wu2yudj.ws-eu38.gitpod.io/src/stores/script/Script.ts:164:13)
    at executeAction (https://3001-prisma-studiocode-oap8wu2yudj.ws-eu38.gitpod.io/node_modules/.vite/chunk-TBMQ2Y3I.js?v=04cb37f7:752:15)
    at Script.update (https://3001-prisma-studiocode-oap8wu2yudj.ws-eu38.gitpod.io/node_modules/.vite/chunk-TBMQ2Y3I.js?v=04cb37f7:739:12)
    at https://3001-prisma-studiocode-oap8wu2yudj.ws-eu38.gitpod.io/src/stores/bootstrap/BootstrapStore.ts:101:38
    at Array.forEach (<anonymous>)
  1. Does the issue persist even after updating to the latest prisma CLI dev version? (npm i -D prisma@dev)

Yes

  1. Prisma schema (if relevant):
    Not relevant
@janpio janpio added bug/2-confirmed Bug has been reproduced and confirmed. kind/bug A reported bug. topic: Invalid string length labels Mar 30, 2022
@janpio
Copy link
Contributor Author

janpio commented Mar 30, 2022

Workaround is to delete the IndexedDB database via your browser's developer tools:
image

@rahXephonz
Copy link

Kinda nicely sir.

@mzw4
Copy link

mzw4 commented Apr 14, 2022

Workaround worked for me, thanks!

@hussamkhatib
Copy link

Tried clearing out the indexed db. Dint work.
I'm using another browser as a workaround temporarily

@abdipriyangga
Copy link

Nice sir, I follow your suggestion, and that works for me.

@jonschlinkert
Copy link

Had the same bug. Can confirm that this worked for me.

@dancosta-fed
Copy link

dancosta-fed commented Nov 15, 2023

I've got the ERR_EMPTY_RESPONSE.

My Prisma Studio was working just fine. Until I tried to migrate a change to a model I had used before. So, in my terminal I was advised to run yarn prisma migrate dev --create-only. And so I did, thought I'd manually apply the changes to the things I've used.

But then I got an error. (Can remember what it said exactly).

Tried reloading the Prisma Studio, tried killing it and doing it again.. even tried repeating the process. But now, no matter what prisma command I try to use.. they all send me to prisma studio and the page what open.

Captura de Tela 2023-11-15 às 14 59 29

any ideas?

EDIT

Those are my yarn prisma commands..
Captura de Tela 2023-11-15 às 15 00 24

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug/2-confirmed Bug has been reproduced and confirmed. kind/bug A reported bug. topic: Invalid string length
Projects
None yet
Development

No branches or pull requests

7 participants