FuelLabs / fuels-ts

Fuel Network Typescript SDK
https://docs.fuel.network/docs/fuels-ts/
Apache License 2.0
44.25k stars 1.34k forks source link

No storage provided #2513

Closed chappie1998 closed 3 months ago

chappie1998 commented 3 months ago

What version of fuels-ts are you using?

0.89.1

Steps to Reproduce

Used default connectors in the next app., getting the error while building the application during deploying.

Expected Behavior

the error should not be there

Actual Behavior

No storage provided

error:- 

Error: No storage provided
    at e.getStorage (/home/chappie/fuelart_app/.next/server/chunks/987.js:23:241993)
    at new e (/home/chappie/fuelart_app/.next/server/chunks/987.js:23:241401)
    at D (/home/chappie/fuelart_app/.next/server/chunks/987.js:23:248250)
    at 8141 (/home/chappie/fuelart_app/.next/server/chunks/672.js:1:2371)
    at t (/home/chappie/fuelart_app/.next/server/webpack-runtime.js:1:142)
    at F (/home/chappie/fuelart_app/node_modules/next/dist/compiled/next-server/app-page.runtime.prod.js:12:91984)
    at $ (/home/chappie/fuelart_app/node_modules/next/dist/compiled/next-server/app-page.runtime.prod.js:12:90535)
    at rE (/home/chappie/fuelart_app/node_modules/next/dist/compiled/next-server/app-page.runtime.prod.js:12:34657)
    at nO (/home/chappie/fuelart_app/node_modules/next/dist/compiled/next-server/app-page.runtime.prod.js:12:60678)
    at nI (/home/chappie/fuelart_app/node_modules/next/dist/compiled/next-server/app-page.runtime.prod.js:12:65445)
(node:751587) [DEP0040] DeprecationWarning: The `punycode` module is deprecated. Please use a userland alternative instead.
maschad commented 3 months ago

Thanks for raising this issue, it seems to be that you are trying to access the window before it's initialized. Could you provide a link to the next app and steps to reproduce this on the repo?

chappie1998 commented 3 months ago

hey @maschad https://github.com/chappie1998/my-fuel-project/tree/storage-bug I made a dummy repo for bug. you just need to build the repo.

LuizAsFight commented 3 months ago

this one looks like it's in connector side, instead of sdk @chappie1998 , by any chance are you using the defaultConnectors and building it in nodejs env?

chappie1998 commented 3 months ago

@LuizAsFight I am using defaultConnectors and I am using nextjs. provided repo above.

maschad commented 3 months ago

@chappie1998 I haven't been able to reproduce this error on my side. I've built the project and I have it running at localhost (see the screenshot attached).

Screenshot 2024-06-17 at 12 20 37 PM

Below is my fuelup show output for my toolchain

Screenshot 2024-06-17 at 12 23 00 PM

Could you please provide clear step-by-step instructions on how to reproduce this exact error?

As @LuizAsFight asked are you using defaultConnectors to deploy to a node environment? As the window would not be available there.

LuizAsFight commented 3 months ago

we are aware of this problem, should be fixed soon https://github.com/FuelLabs/fuel-connectors/issues/107

maschad commented 3 months ago

I'll close this issue as it's not directly related to this repo. We can continue tracking it at https://github.com/FuelLabs/fuel-connectors/issues/107