0

Why I can't see bugs in console?

I've uploaded my code public to test it https://code.sololearn.com/WEypBr2uwDXf 2 people commented that there is a bug in line 23, can't assign to undefined but I can't see anything in the console and the code is working 100% fine with me even with strict mode! https://prnt.sc/1pxayc5

16th Aug 2021, 9:24 PM
Gamal Mohammed
Gamal Mohammed - avatar
13 odpowiedzi
+ 5
It is not exactly an Android bug, I think, but it is rather just the fact that different environments handle web codes differently – like different browsers or app versions. I tested on Android, too. After I had put your js inside window.onload = () => { // here goes your js.... } it seemed to work.
17th Aug 2021, 11:11 AM
Lisa
Lisa - avatar
+ 1
That seems to be it. I just tried on the website and there it works without throwing an error. In the app apart from the error message, clicking on the monster has no effect.
16th Aug 2021, 10:11 PM
Simon Sauter
Simon Sauter - avatar
+ 1
I'm using the android version. Maybe it's a bug in the app.
16th Aug 2021, 10:11 PM
Simon Sauter
Simon Sauter - avatar
+ 1
If You Want All the Bugs, You Can Download (Copy All The Code from Sollearn and paste it in an index.html file). Then, If You Have VS Code, You Can Debug the index.html File...
20th Aug 2021, 1:55 AM
Sancho Godinho
Sancho Godinho - avatar
0
When I run it it doesn't show that error, but a different one: Uncaught TypeError: Cannot set property 'value' of null Line: 27
16th Aug 2021, 9:42 PM
Simon Sauter
Simon Sauter - avatar
0
How can you see this error?
16th Aug 2021, 10:00 PM
Gamal Mohammed
Gamal Mohammed - avatar
0
It just shows up at the bottom of the screen.
16th Aug 2021, 10:03 PM
Simon Sauter
Simon Sauter - avatar
0
nothing there is console!
16th Aug 2021, 10:04 PM
Gamal Mohammed
Gamal Mohammed - avatar
0
Does it show when you click on the three dots in the top right and choose "Show Console"?
16th Aug 2021, 10:05 PM
Simon Sauter
Simon Sauter - avatar
0
I've already attached a screenshot of the console https://prnt.sc/1pxayc5 and as you can see there is nothing
16th Aug 2021, 10:06 PM
Gamal Mohammed
Gamal Mohammed - avatar
0
Maybe the difference is between the website and the app. I'm using the app.
16th Aug 2021, 10:08 PM
Simon Sauter
Simon Sauter - avatar
0
I've already tried from my iPhone, it's working without any errors too. I don't know
16th Aug 2021, 10:10 PM
Gamal Mohammed
Gamal Mohammed - avatar
0
yeah it seems android bug, I'll try to give it a look.
16th Aug 2021, 10:12 PM
Gamal Mohammed
Gamal Mohammed - avatar