Closed Sharlottes closed 1 year ago
Great bug report!
From a quick glance it seems that the second interval has a delay of 1ms. This is probably the issue (we should be robust to this).
Try increasing 1 to something like 50.
@mmoskal can we update the error message with some kind of code that the vscode addon would expand into a help page? Seems like this one is a common gotcha.
Great bug report!
From a quick glance it seems that the second interval has a delay of 1ms. This is probably the issue (we should be robust to this).
Try increasing 1 to something like 50.
I tried to increase 1 to 100 on the second try. but as I mentioned above, even if I created a new project(default generated code) same error(loopback rx ovf) occurred. it means the code is not related to this issue. I also doubt if this is really deviceScript's problem, Because it happened all of a sudden without any clues. But I've never touched the board directly, and it's a new product that came two days ago, so it's not an aging issue. Doubting hardware problems is the last thing to consider, so I wanted to ask for help with the GitHub issue.
if it was really code's problem, the issue should be fixed when I reset the board and start a plain console.log(1);
code.
..but as you can see, it wasn't.
@pelikhan as for the "loopback rx ovf" message, here is where it could be patched on CLI side https://github.com/microsoft/devicescript/blob/main/interop/src/debug.ts#L54
we need to:
@Sharlottes you should be able to erase the flash on the board by running esptool erase_flash
. I have added --clean
option to devs flash
but it will take a while to get to you
v2.10.2 has the --clean support. @Sharlottes
the packets are now throttled in v2.10.500
thanks for your advice! I tried devs flash --clean
and succeeded to clean and flash again.
but after updating the DeviceScript, it suddenly required me to install node.js packages even if I installed them again. | when I tried to connect the device with a new project, it still showed that message. not only the "connect to device" button, but also the "start simulator" button, and plug/graph/dashboard/list icon are the same. |
also, I tried to remove and install the DeviceScript extension again, but still in the same situation.
removing .devicescript
, node_modules
also not works.
here is my current directory. is there something missing? I cannot find any clue again.
We moved our tooling to use npm
instead of yarn
. And I wonder if it is getting confused since you already have a yarn.lock
.
VSCode is search for ./node_modules/.bin/devicescript . Could you should list of files in node_modules/.bin
in that folder?
I tried to start the DeviceScript by CLI, not vscode extension because I want to see if the "loopback rx ovf" error is solved. and..it works! 🎉
We moved our tooling to use npm instead of yarn. And I wonder if it is getting confused since you already have a yarn.lock.
I am also confused because the document mentioned yarn too. is it outdated?
VSCode is search for ./node_modules/.bin/devicescript . Could you should list of files in node_modules/.bin in that folder?
there was no .bin
, I thought it was for global because the DeviceScript CLI command does not work when I install the CLI locally, not global.
so I install it via npm i @devicescript/cli
. now everything works fine. thanks for your advice again!
yes the instructions were generated in a previous build which used yarn. We ran a workshop yesterday and a large amount of users had trouble with finding yarn on their machine; so we are moving away from it.
To be clear, did you install the CLI globally?
yes i did. should i remove global deviecscript CLI?
Yes it would be best to remove it.
However, we should handle this case better…
From: Sharlotte @.> Sent: Wednesday, June 7, 2023 7:30:02 AM To: microsoft/devicescript @.> Cc: Peli de Halleux @.>; Mention @.> Subject: Re: [microsoft/devicescript] "loopback rx ovf" log spamming (Issue #432)
yes i did. should i remove global deviecscript CLI?
— Reply to this email directly, view it on GitHubhttps://github.com/microsoft/devicescript/issues/432#issuecomment-1580947315, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AA73QKLY37JO5VAIENDWOKTXKCF6VANCNFSM6AAAAAAYZHU3IQ. You are receiving this because you were mentioned.Message ID: @.***>
user@DESKTOP-18FQSK1 MINGW64 ~/Documents/GitHub/DSProject (master)
$ npm uninstall -g @devicescript/cli
removed 128 packages, and audited 1 package in 578ms
found 0 vulnerabilities
user@DESKTOP-18FQSK1 MINGW64 ~/Documents/GitHub/DSProject (master)
$ devs
bash: devs: command not found
ok I uninstall cli which is installed globally. as I expected, it doesn't work even if there are "devs"-related files in /node_modules/.bin/
.
finding the locally installed tools is somewhat flaky.
Try running 'npm run devs' to make it more robust. npm will find the devs tool path for you.
$ npm run devs
npm ERR! Missing script: "devs"
npm ERR!
npm ERR! To see a list of scripts, run:
npm ERR! npm run
npm ERR! A complete log of this run can be found
in:
npm ERR! C:\Users\user\AppData\Local\npm-cache\_logs\2023-06-07T14_54_08_378Z-debug-0.log
it seems like harder than I expected. npm cannot find the tool path. just try to find the script command according to package.json
Could you try to run install again? Just to be sure.
npm install
ls node_modules/.bin
npm run devs
Thanks for hanging in there!
i got same log. i also thanks for hanging in there too!
user@DESKTOP-18FQSK1 MINGW64 ~/Documents/GitHub/DSProject (master)
$ npm install
> dsproject@0.1.0 postinstall
> devicescript build
using devs: v2.10.7, runtime: v2.10.7, node: v18.13.0
from C:\Users\user\Documents\GitHub\DSProject\node_modules\@devicescript\cli\built
removed 13 packages, and audited 129 packages in 3s
55 packages are looking for funding
run `npm fund` for details
found 0 vulnerabilities
user@DESKTOP-18FQSK1 MINGW64 ~/Documents/GitHub/DSProject (master)
$ ls node_modules/.bin
devicescript* node-gyp-build.ps1*
devicescript.cmd node-gyp-build-optional*
devicescript.ps1* node-gyp-build-optional.cmd
devicescript-cli* node-gyp-build-optional.ps1*
devicescript-cli.cmd node-gyp-build-test*
devicescript-cli.ps1* node-gyp-build-test.cmd
devs* node-gyp-build-test.ps1*
devs.cmd rc*
devs.ps1* rc.cmd
is-ci* rc.ps1*
is-ci.cmd semver*
is-ci.ps1* semver.cmd
node-gyp-build* semver.ps1*
node-gyp-build.cmd
user@DESKTOP-18FQSK1 MINGW64 ~/Documents/GitHub/DSProject (master)
$ npm run devs
npm ERR! Missing script: "devs"
npm ERR!
npm ERR! To see a list of scripts, run:
npm ERR! npm run
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\user\AppData\Local\npm-cache\_logs\2023-06-07T15_06_13_611Z-debug-0.log
One more to see if yarn is smarter
yarn devs
...oh my god. yarn is really smart.
user@DESKTOP-18FQSK1 MINGW64 ~/Documents/GitHub/DSProject (master)
$ yarn devs
yarn run v1.22.19
warning ..\..\..\package.json: No license field
$ C:\Users\user\Documents\GitHub\DSProject\node_modules\.bin\devs
using devs: v2.10.7, runtime: v2.10.7, node: v18.13.0 from C:\Users\user\Documents\GitHub\DSProject\node_modules\@devicescript\cli\built
Done in 1.94s.
user@DESKTOP-18FQSK1 MINGW64 ~/Documents/GitHub/DSProject (master)
$ devs
bash: devs: command not found
user@DESKTOP-18FQSK1 MINGW64 ~/Documents/GitHub/DSProject (master)
$ yarn devs --help
yarn run v1.22.19
warning ..\..\..\package.json: No license field
$ C:\Users\user\Documents\GitHub\DSProject\node_modules\.bin\devs --help
Usage: DeviceScript [options] [command]
build and run DeviceScript program https://aka.ms/devicescript
Options:
-V, --version output the version number
-v, --verbose more logging (can be repeated)
--quiet less logging
--no-colors disable color output
--dev developer mode
-h, --help display help for command
Commands:
build [options] [src/mainXYZ.ts] build a DeviceScript file
flags show description of compiler flags
devtools [options] [file.ts] launches a local development tools server
run [options] [file.ts|file.devs] run a script
vm [options] start DeviceScript VM interpreter process
disasm [options] [file.ts|file-dbg.json|file.devs] disassemble .devs binary
annotate annotate stack frames in stdin
flash [options] flash DeviceScript runtime (interpreter/VM)
add add a feature to the project
init [options] [dir] creates or configures a devicescript project
help [command] display help for command
Done in 0.83s.
bash cannot find "devs" command itself but yarn can find the command. i might solve the problem roughly
[like] Peli de Halleux reacted to your message:
From: Sharlotte @.> Sent: Wednesday, June 7, 2023 3:13:46 PM To: microsoft/devicescript @.> Cc: Peli de Halleux @.>; Mention @.> Subject: Re: [microsoft/devicescript] "loopback rx ovf" log spamming (Issue #432)
...oh my god. yarn is really smart.
@. MINGW64 ~/Documents/GitHub/DSProject (master) $ yarn devs yarn run v1.22.19 warning ......\package.json: No license field $ C:\Users\user\Documents\GitHub\DSProject\node_modules.bin\devs using devs: v2.10.7, runtime: v2.10.7, node: v18.13.0 from @.\cli\built Done in 1.94s.
@.*** MINGW64 ~/Documents/GitHub/DSProject (master) $ devs bash: devs: command not found
@.*** MINGW64 ~/Documents/GitHub/DSProject (master) $ yarn devs --help yarn run v1.22.19 warning ......\package.json: No license field $ C:\Users\user\Documents\GitHub\DSProject\node_modules.bin\devs --help Usage: DeviceScript [options] [command]
build and run DeviceScript program https://aka.ms/devicescript
Options: -V, --version output the version number -v, --verbose more logging (can be repeated) --quiet less logging --no-colors disable color output --dev developer mode -h, --help display help for command
Commands: build [options] [src/mainXYZ.ts] build a DeviceScript file flags show description of compiler flags devtools [options] [file.ts] launches a local development tools server run [options] [file.ts|file.devs] run a script vm [options] start DeviceScript VM interpreter process disasm [options] [file.ts|file-dbg.json|file.devs] disassemble .devs binary annotate annotate stack frames in stdin flash [options] flash DeviceScript runtime (interpreter/VM) add add a feature to the project init [options] [dir] creates or configures a devicescript project help [command] display help for command Done in 0.83s.
bash cannot find "devs" command itself but yarn can find the command. i might solve the problem roughly
— Reply to this email directly, view it on GitHubhttps://github.com/microsoft/devicescript/issues/432#issuecomment-1581033868, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AA73QKM3ECAHQTDN6ORLCOLXKCLCVANCNFSM6AAAAAAYZHU3IQ. You are receiving this because you were mentioned.Message ID: @.***>
Fixed original issue. Let's use a new discussion for new problems.
Describe the bug
I started DeviceScript 2 days ago and trying to control servo-motor. when I start DeviceScript with the code
suddenly, it spams "loopback rx ovf" text on the devicescript terminal and it's suddenly stoped and shows 3 error logs.
I reset the device (adafruit_qt_py_c3 board has reset button) and reconnect it by vscode extension. then below logs are shown on devicescript terminal.
after retrying several times(3), the terminal is suddenly died after showing the log at below image.
so I reconnect the device again by same behaviour. and below logs are shown on the new devicescript terminal.
I realized that the devicescript code does not care about this issue because even if I reset the device and even if I re-flash the device, the same situation has occurred. i really don't know the reason of that "loopback rx ovf"
To Reproduce
run that code in adafruit_qt_py_c3 device and click run button in vscode extension
Expected behavior
The LightBulb connected to the A1 pin should blink every 500 ms, and the servo motor connected to the A2 pin should rotate 1 degree every 1 ms.
Screenshots
posted above description.
Additional context
I started devicescript a few days ago, and I'm new in the IoT space. so I may miss something important, please tell me if there is. develop OS: windows10 develop environment: vscode, with devicescript extension and cli develop device: adafruit-qt-py-c3 this issue occurred yesterday. I tried restarting everything. reset/reboot the device(board), restarting VScode, restarting the PC, recreating the project with editing nothing.