Comments (3)
Note that we are currently unable to provide 100% steps for reproduction here. (NEVERMIND! 3/27)
from sprig.
Here is a minimal procedure to reproduce the issue.
Consider the following example:
/*
First time? Check out the tutorial game:
https://sprig.hackclub.com/gallery/getting_started
@title:
@author:
@tags: []
@img: ""
@addedOn: 2024-00-00
*/
const player = "p"
setLegend(
[ player, bitmap`...` ]
)
setSolids([])
let level = 0
const levels = [
map`
p.
..`
]
setMap(levels[level])
setPushables({
[ player ]: []
})
onInput("s", () => {
getFirst(player).y += 1
})
afterInput(() => {
})
- Duplicate this line, without adding a separating comma
[ player, bitmap`...` ]
- Click Run. The editor appropriately raises a syntax error:
Error: The sprites passed into setLegend each need to be in square brackets, like setLegend([player, bitmap`...`]).
at setLegend (index.78f90869.js:1:8965)
at setLegend (index.78f90869.js:3120:12136)
at eval (index.78f90869.js:14:1)
- Looking at the console events log, the backend also raises this error
editor.bde1f794.js:23 Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'state')
at editor.bde1f794.js:23:22531
at Array.map (<anonymous>)
at f1 (editor.bde1f794.js:23:22513)
at editor.bde1f794.js:23:26806
at p.x (signals.module.5a04f1ba.js:1:1208)
at p.c (signals.module.5a04f1ba.js:1:3642)
at $ (signals.module.5a04f1ba.js:1:312)
at u.set (signals.module.5a04f1ba.js:1:1616)
at Object.c [as onClick] (editor.bde1f794.js:268:6812)
at Object.onClick (button.7ef0ffa5.js:8:108)
at HTMLButtonElement.B (preact.module.3821bb68.js:1:4195)
Now, the map cannot be opened. I suspect that when this particular syntax error is present, once we click "Run", an autosave is attempted. This autosave likely fails, setting the value of some important property to null. When the modal popup view is then triggered, we try accessing a property of some null value, which prevents the map from opening in the future. It's not entirely clear to me which portion of the TypeScript source code the backend error provided in step 3 relates to (since it's fairly cryptic due to the JS compilation), but it may be a good idea to check this file for anything suspicious, as well as wherever the saving loop is implemented.
from sprig.
i get a different error:
Uncaught (in promise) TypeError: (destructured parameter) is undefined
children map-editor.tsx:81
MapEditor map-editor.tsx:81
Preact 15
debounceRendering debounceRendering.js:13
[map-editor.tsx:81:25](http://localhost:3000/src/components/subeditors/map-editor.tsx)
Uncaught (in promise) TypeError: ResizeObserver.observe: Argument 1 is not an object.
MapEditor map-editor.tsx:58
Preact 18
debounceRendering debounceRendering.js:13
2 [map-editor.tsx:58:11](http://localhost:3000/src/components/subeditors/map-editor.tsx)
Uncaught (in promise) TypeError: ResizeObserver.observe: Argument 1 is not an object.
MapEditor map-editor.tsx:58
Preact 18
debounceRendering debounceRendering.js:13
promise callback*options.debounceRendering debounceRendering.js:11
Preact 6
onClick open-button.tsx:43
I Preact
[map-editor.tsx:58:11](http://localhost:3000/src/components/subeditors/map-editor.tsx)
from sprig.
Related Issues (20)
- GET_A_SPRIG.md seems to be outdated.
- Hardware KiCAD file is missing a library HOT 3
- Spade Docker / Gardenshed: Support PC Build
- Add metadata.json to .gitignore HOT 2
- Gardenshed: gardenshed.py start-debugger doesn't work on Fedora Workstation 39
- Code input field shows email field, confusing users greatly
- Map editor does not open HOT 1
- design more robust debug probe HOT 1
- error not properly displaying when variable declared twice HOT 1
- Add Collaborative Editing to the sprig Editor
- Create UX proposal for Sprig theme picker
- Propose specific UX for new Penny theme
- teleport(spr, newX, newY) HOT 7
- Create new Theme picker dropdown in sprig editor HOT 6
- Relocate "I'm stuck", "Run on Device", and "Theme picker" to a dropdown HOT 1
- Icon broken HOT 1
- Improve the model for the sprig on front page HOT 2
- showcase new great games every week HOT 1
- stylize gallery
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from sprig.