tzanou-perso / vscode_tamagotchi_extension

A VSCode Tamagotchi clicker game extension
https://marketplace.visualstudio.com/items?itemName=Tzanou.tamagotchi
MIT License
2 stars 0 forks source link

view stopped loading #2

Closed rkohler8 closed 6 months ago

rkohler8 commented 9 months ago

'An error occurred while loading view: tamagotchi_garden'

view stopped loading. reverted to previous version, restarted, uninstalled and reinstalled and still not loading :(

Tzanou123 commented 8 months ago

Hello, Sorry that you encounter issue To help me to understand and debug Can you give me more details on this behaviour ? What do you mean by "view stopped loading" ?

eybrithingweird commented 6 months ago

Hello, got this issue just yesterday. Opened VS Code like normal, just to see the Tamagotchi window blank. Tried right-clicking > Hide 'Tamagotchi' and reloading it, shows this error:

image_2024-03-06_081338803

Maybe there's anything I can do on my side to try and see its console or anything else?

Tzanou123 commented 6 months ago

Hello, got this issue just yesterday. Opened VS Code like normal, just to see the Tamagotchi window blank. Tried right-clicking > Hide 'Tamagotchi' and reloading it, shows this error: image_2024-03-06_081338803

Maybe there's anything I can do on my side to try and see its console or anything else?

Thanks i think i can reproduce it, i will tell you if not

Tzanou123 commented 6 months ago

I upload a new release with patching the problem you relate ! Can you confirm after update the problems are gone ? I can then merge the branch ! Thanks

eybrithingweird commented 6 months ago

Hello! I still got nothing. Doing the steps described in my previous comment no longer results in showing the error, just blank space right now. I've updated the extension, disabled then enabled it, plus updated my VS Code just to be sure. Also clicked spawn random boss and reset game, still doesn't show anything. I hope this helps!

Tzanou123 commented 6 months ago

can you press f1 then typing developer: open webview developer tools and then copy the content of your console ?

eybrithingweird commented 6 months ago

can you press f1 then typing developer: open webview developer tools and then copy the content of your console ?

Apologies for the late reply! Here's the console: image

I'm using other extensions as well so the messages that were above what I sent are related to those. Making it clearer: closed the extension and re-opened it, these were sent on the console: image

Tzanou123 commented 6 months ago

Thanks for your logs, but unfotunatly there is not much information on the error ! I try on my side to understand with my code and trying to reproduce but no luck on that ! If you can have a bit more details on wich part of the code the properties of undefined is ! It can be helpfull ! Can you try to click on the main-bundle.js link error on the top right corner of the log ? I think it cant point the real problem because it is a compiled and minimified code but we need to try that

eybrithingweird commented 6 months ago

Thanks for your logs, but unfotunatly there is not much information on the error ! I try on my side to understand with my code and trying to reproduce but no luck on that ! If you can have a bit more details on wich part of the code the properties of undefined is ! It can be helpfull ! Can you try to click on the main-bundle.js link error on the top right corner of the log ? I think it cant point the real problem because it is a compiled and minimified code but we need to try that

Hello! Here's the main-bundle.js error: image

eybrithingweird commented 6 months ago

Short update: I noticed that the extension had a 'Reload Required' notice so I did just that, and now the console is logged with a loop of this error: image

The Cannot read properties of undefined (reading 'texture') error still shows up somewhere in the middle. Clicking on main-bundle.js:253 shows this: image

Tzanou123 commented 6 months ago

Thats strange, this code doesnt seems to come from my extension ! Do you have any other extension installed on your vscode that is also a game or may have a canvas js game ? If so can you tell me wich one ? and trying to unable it to see if its correcting the bug ?

Tzanou123 commented 6 months ago

After reviewing the vscode pets extension, The code you gave me seems to come from it, the strange fact is i try to install both on my side and i doesnt get your bug reproduced !

eybrithingweird commented 6 months ago

After reviewing the vscode pets extension, The code you gave me seems to come from it, the strange fact is i try to install both on my side and i doesnt get your bug reproduced !

  • can you tell me on wich platform you are (windos10, 11, macOs ...)
  • Have you updated vscode-pets to latest version ?

You're right, it's the vscode-pets extension, and I have it on the latest version on Windows 11. The main-bundle.js error still gets triggered after disabling the vscode-pets extension. I also tried uninstalling the vscode-pets and re-enabling Tamagotchi but the same error is still shown; Tamagotchi's canvas is still blank.

The issue didn't happen immediately, as both extensions were working for me until the day I commented on this post. It was working well for me for how many days (or even weeks? can't remember when I installed it).

EDIT: The second code screenshot I sent really wasn't from your extension; the looping Uncaught: InvalidStateException {} error on main-bundle.js:253 is from this file: https://file+.vscode-resource.vscode-cdn.net/c%3A/Users/HP/.vscode/extensions/tonybaloney.vscode-pets-1.25.1/media/main-bundle.js

The Cannot read properties of undefined (reading 'texture') error on main-bundle.js:2 is from this file: https://file+.vscode-resource.vscode-cdn.net/c%3A/Users/HP/.vscode/extensions/tzanou.tamagotchi-0.4.3/media/main-bundle.js

eybrithingweird commented 6 months ago

Figured out how to do some changes on the code only on my side, so I went ahead to that file and tried placing console.log(e[0]) to try and find the source of the error. Interestingly enough, after saving the changes, this new error popped up: image

Going to that portion in main-bundle.js:2 shows this: image

Placing console.log(r) before the error shows this on the console: image (r.settings is undefined)

Tzanou123 commented 6 months ago

Hello, First of all thank you very much for your kindness into helping me for resolving this issue ! I deploy a new version where i try to catch the error and let the extension anyway run if there is an error since if it is what i think the error come when we try to reload an old state of the game ! I also add a console log to be sure the error come where i think ! Can you please test it ? and give me the console log if the error still happen

Thanks

eybrithingweird commented 6 months ago

Hello, First of all thank you very much for your kindness into helping me for resolving this issue ! I deploy a new version where i try to catch the error and let the extension anyway run if there is an error since if it is what i think the error come when we try to reload an old state of the game ! I also add a console log to be sure the error come where i think ! Can you please test it ? and give me the console log if the error still happen

Thanks

Hello, no problem at all!

The screen is now showing the game, but the data is back to zero! Here's the screenshot of the console: image

EDIT: The other padding issue is now gone so far! Good job! image

Tzanou123 commented 6 months ago

Nice, Happy that the game is back for you . Unfortunatly i think the old data from your game is gone, it was an error coming from it, maybe a corrupted one from a previous version updated. Complicated to say exactly wich data since you had log from compiled code ! Anyway i will close this issue doesnt hesitate to contact me again if the error come again or if the data never saved when you reload vscode ! Thanks for your patience and enjoy the game ;)