Page 1 of 1

Eos 'undefined' bug

Posted: Tue Mar 12, 2024 2:34 pm
by Shattered
There is one bug that never seems to go away with Eos and is inconsistent.

Essentially, we set userName as the players name, and it works most of the time. But occasionally, it displays undefined instead and I can't see a rhyme or reason for it. I have some examples from when someone played my latest tease https://milovana.com/eos/editor/50854/preview (I'll make a post on the forum if you don't see this before then just so there's a record)
Here's some page examples and the text where it randomly went undefined

1-Kang-5

"Oh my God, undefined! I was joking, but...wow, I'm learning a lot about you tonight!

Day-2-Kang-2

"Airport Selfie!
Finally got out of bed huh, undefined!"

Re: Eos 'undefined' bug

Posted: Tue Mar 12, 2024 3:00 pm
by HerpDerp42
Shattered wrote: Tue Mar 12, 2024 2:34 pm There is one bug that never seems to go away with Eos and is inconsistent.

Essentially, we set userName as the players name, and it works most of the time. But occasionally, it displays undefined instead and I can't see a rhyme or reason for it. I have some examples from when someone played my latest tease https://milovana.com/eos/editor/50854/preview (I'll make a post on the forum if you don't see this before then just so there's a record)
Here's some page examples and the text where it randomly went undefined

1-Kang-5

"Oh my God, undefined! I was joking, but...wow, I'm learning a lot about you tonight!

Day-2-Kang-2

"Airport Selfie!
Finally got out of bed huh, undefined!"
When starting the tease the variable as which the name gets saved is called
userRealname
. Are you sure the variable "userName" is generated and/ or saved before going to that page? Scrolling through it it seems to be chosen at day2 but I never see it getting saved.

Re: Eos 'undefined' bug

Posted: Tue Mar 12, 2024 6:03 pm
by Shattered
HerpDerp42 wrote: Tue Mar 12, 2024 3:00 pm
Shattered wrote: Tue Mar 12, 2024 2:34 pm There is one bug that never seems to go away with Eos and is inconsistent.

Essentially, we set userName as the players name, and it works most of the time. But occasionally, it displays undefined instead and I can't see a rhyme or reason for it. I have some examples from when someone played my latest tease https://milovana.com/eos/editor/50854/preview (I'll make a post on the forum if you don't see this before then just so there's a record)
Here's some page examples and the text where it randomly went undefined

1-Kang-5

"Oh my God, undefined! I was joking, but...wow, I'm learning a lot about you tonight!

Day-2-Kang-2

"Airport Selfie!
Finally got out of bed huh, undefined!"
When starting the tease the variable as which the name gets saved is called
userRealname
. Are you sure the variable "userName" is generated and/ or saved before going to that page? Scrolling through it it seems to be chosen at day2 but I never see it getting saved.
This does explain those two scenarios :lol: fixed that bug at least, but I have had other reports of it being all undefined while other variables are saving :-O

Re: Eos 'undefined' bug

Posted: Tue Mar 12, 2024 6:20 pm
by HerpDerp42
Shattered wrote: Tue Mar 12, 2024 6:03 pm
HerpDerp42 wrote: Tue Mar 12, 2024 3:00 pm
Shattered wrote: Tue Mar 12, 2024 2:34 pm There is one bug that never seems to go away with Eos and is inconsistent.

Essentially, we set userName as the players name, and it works most of the time. But occasionally, it displays undefined instead and I can't see a rhyme or reason for it. I have some examples from when someone played my latest tease https://milovana.com/eos/editor/50854/preview (I'll make a post on the forum if you don't see this before then just so there's a record)
Here's some page examples and the text where it randomly went undefined

1-Kang-5

"Oh my God, undefined! I was joking, but...wow, I'm learning a lot about you tonight!

Day-2-Kang-2

"Airport Selfie!
Finally got out of bed huh, undefined!"
When starting the tease the variable as which the name gets saved is called
userRealname
. Are you sure the variable "userName" is generated and/ or saved before going to that page? Scrolling through it it seems to be chosen at day2 but I never see it getting saved.
This does explain those two scenarios :lol: fixed that bug at least, but I have had other reports of it being all undefined while other variables are saving :-O
While testing I experienced myself that the variables are saved locally in the session. There is a good chance that the variable wasn't properly saved /loaded using the teaseStorage but only "stayed" around. Are you certain the variables you considered saved werent just stuck in your browser?

Re: Eos 'undefined' bug

Posted: Tue Mar 12, 2024 6:26 pm
by Nice-Log
I had something similar when testing a page that picks text to display out of a list via JS and my first run-through returned "undefined", but every loop through after that worked correctly. It could maybe be an index out of range exception, but for that to happen the built-in random function would have needed to return an impossible number.

Also out of general curiosity Shattered, what happens if someone edits your tease using the preview link you sent out? Does it get edited on your end too? Or does it refuse to save if you're not the owner of the tease?

Re: Eos 'undefined' bug

Posted: Tue Mar 12, 2024 7:48 pm
by Shattered
HerpDerp42 wrote: Tue Mar 12, 2024 6:20 pm
Shattered wrote: Tue Mar 12, 2024 6:03 pm
HerpDerp42 wrote: Tue Mar 12, 2024 3:00 pm

When starting the tease the variable as which the name gets saved is called . Are you sure the variable "userName" is generated and/ or saved before going to that page? Scrolling through it it seems to be chosen at day2 but I never see it getting saved.
This does explain those two scenarios :lol: fixed that bug at least, but I have had other reports of it being all undefined while other variables are saving :-O
While testing I experienced myself that the variables are saved locally in the session. There is a good chance that the variable wasn't properly saved /loaded using the teaseStorage but only "stayed" around. Are you certain the variables you considered saved werent just stuck in your browser?
In my testing it worked, then I have reports it doesn't, so I can't be sure, but I always hear about it from someone..
Nice-Log wrote: Tue Mar 12, 2024 6:26 pm I had something similar when testing a page that picks text to display out of a list via JS and my first run-through returned "undefined", but every loop through after that worked correctly. It could maybe be an index out of range exception, but for that to happen the built-in random function would have needed to return an impossible number.

Also out of general curiosity Shattered, what happens if someone edits your tease using the preview link you sent out? Does it get edited on your end too? Or does it refuse to save if you're not the owner of the tease?
I didn't think you could edit from a preview link so you might need more detail there!

Re: Eos 'undefined' bug

Posted: Tue Mar 12, 2024 7:54 pm
by HerpDerp42
Shattered wrote: Tue Mar 12, 2024 7:48 pm

In my testing it worked, then I have reports it doesn't, so I can't be sure, but I always hear about it from someone..

I didn't think you could edit from a preview link so you might need more detail there!
That was kind of my point: while testing you were likely always usign the same session. Does even while playing day2 the variables form day1 were still saved, whereas the players did play those in two different sessions so the variable didn't exist for them.
I reocmmend using one single "end" page in which all variable are saved at the end. Now instead of ending somewhere always redirect to that end page to ensure you never forget any variable.

About the editing: I was a bit stupid and brainlessly edited something. But it said 'Error' on the top right, so any changes are probably not saved.