-
• #2
If I change the settings to minify it offline it loads perfectly. However, it's a little bit frustrating because it's apparently not the code itself that has a problem, which makes it pretty hard to understand and debug.
-
• #3
It's a little frustrating, because I can't really tell if I am doing something wrong and what I can do to mitigate the issues.
There were no changes to settings or the program and I wasn't able to do anything with it this morning. This fragility with the interaction between the IDE and the device makes the IDE difficult to work with. I understand the complications of creating a device like this, and I would really like some insight into what is going on when I execute an upload/flash:
_____ _ | __|___ ___ ___ _ _|_|___ ___ | __|_ -| . | _| | | | | . | |_____|___| _|_| |___|_|_|_|___| |_| http://espruino.com 1v95 Copyright 2017 G.Williams > =undefined Erasing Flash... Writing...................... Compressed 114368 bytes to 20259 Checking... Done! Running onInit()... ERROR: Prompt not detected - upload failed. Trying to recover... in function "registerLine" called from line 1 col 246 ....registerLine("4,CONNECT",h),c.registerLine("0,CLOSED",k),c.... ^ in function "registerLine" called from line 1 col 275 ...c.registerLine("0,CLOSED",k),c.registerLine("1,CLOSED",k),c.... ^ in function "registerLine" called from line 1 col 304 ...c.registerLine("1,CLOSED",k),c.registerLine("2,CLOSED",k),c.... ^ in function "registerLine" called from line 1 col 333 ...c.registerLine("2,CLOSED",k),c.registerLine("3,CLOSED",k),c.... ^ in function "registerLine" called from line 1 col 362 ...c.registerLine("3,CLOSED",k),c.registerLine("4,CLOSED",k),ex... ^ in function "registerLine" called from line 1 col 391 ...c.registerLine("4,CLOSED",k),exports.at=c,require("NetworkJS... ^ in function "cmd" called from line 2 col 300 ...ter AT+RST");else return l}),digitalWrite(x,1),digitalWrite(... ^ in function "p" called from line 2 col 241 ...")):setTimeout(d,0,null)})}) ^ in function "connect" called from line 1 col 169 ...onnected!'),initProcess();}); ^ in function called from system ERROR: Error processing Serial data handler - removing it. Execution Interrupted during event processing. New interpreter error: CALLBACK >echo(1) =undefined New interpreter error: BUFFER_FULL
Then I turn minification off (couldn't do anything without turning it on yesterday) and it loads the program, although it gives an error, so the behavior is very inconsistent:
_____ _ | __|___ ___ ___ _ _|_|___ ___ | __|_ -| . | _| | | | | . | |_____|___| _|_| |___|_|_|_|___| |_| http://espruino.com 1v95 Copyright 2017 G.Williams > =undefined Erasing Flash... Writing........................ Compressed 114368 bytes to 21752 Checking...ERROR: Prompt not detected - upload failed. Trying to recover... Done! Running onInit()... >echo(1) =undefined Connected! Init: Wed, 27 Dec 2017 13:51:06 GMT Starting logging Starting server
-
• #4
Take the save() out of the code you upload and type save on the left of the ide.
Every time the device restarts the last thing it does is try to save sgain.
-
• #5
@Wilberforce Thank you. I think I got that from an example somewhere.
-
• #6
Great - glad you got this sorted! Do you remember where that example was? If it's on the Espruino site I might be able to change it.
Sadly, as with most things, there's a lot of bad advice on the internet that I have no control over.
This kind of thing has been happening a lot recently, so I guess about the only thing I could do is to add code to the Web IDE to detect when people do this and them warn them.
First day with the Esrpuino Wifi. I'm not sure what to expect, and I realize that it's an embedded platform. I have a lot of experience with Arduinos, the Esquilo, etc.
The following code will load and run if I comment out either the "startServer" or the "startLogging" functions. But if I try to run the whole program it fails with the following: