-
Notifications
You must be signed in to change notification settings - Fork 123
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
No DeviceScript Managers found #651
Comments
I think you want to first deploy the DeviceScript firmware to the pico so that the CLI will find it. You can find instructions at https://microsoft.github.io/devicescript/devices/rp2040/pico-w#firmware-update (In general, the vscode experience is more polished than the CLI wich will have some abrupt error messages). |
Yeah, sure, I forgot to mention I already did that 😅 I'm familiar with VSC extension but on daily basis I use different IDE, so I thought that I can make use of cli instead. Also, because I tried extension already I had expectations that I achieved what I initially wanted to do by manually running the below commands devs bundle --board pico src/main.ts
// and later
devs flash --board pico --file .devicescript/bin/bundle-devicescript-rp2040-pico.uf2 is it something what Deploy error: No DeviceScript Managers found.
build src/main.ts OK
deploy status: No DeviceScript Managers found. |
Yes we need to undust the cli a bit. I suspect it doesn't even try to connect to the board but still expects to be able to flash the device. Is there a |
There is services: error adding potentiometer, classIdentifier already in use
adding USB transport (requires "usb" package)
node:internal/modules/cjs/loader:1077
const err = new Error(message);
^
Error: Cannot find module 'usb'
Require stack:
- /some/user/projectX/node_modules/@devicescript/cli/built/devicescript-cli.cjs
- /some/user/projectX/node_modules/@devicescript/cli/devicescript
at Module._resolveFilename (node:internal/modules/cjs/loader:1077:15)
at Module._load (node:internal/modules/cjs/loader:922:27)
at Module.require (node:internal/modules/cjs/loader:1143:19)
at require (node:internal/modules/cjs/helpers:119:18)
at tryRequire (/some/user/projectX/node_modules/@devicescript/cli/built/devicescript-cli.cjs:488880:10)
at createUSB (/some/user/projectX/node_modules/@devicescript/cli/built/devicescript-cli.cjs:488890:15)
at createTransports (/some/user/projectX/node_modules/@devicescript/cli/built/devicescript-cli.cjs:488977:21)
at Command3.devtools (/some/user/projectX/node_modules/@devicescript/cli/built/devicescript-cli.cjs:490514:22)
at Command3.listener [as _actionHandler] (/some/user/projectX/node_modules/@devicescript/cli/built/devicescript-cli.cjs:1367:21)
at /some/user/projectX/node_modules/@devicescript/cli/built/devicescript-cli.cjs:2044:69
at Command3._chainOrCall (/some/user/projectX/node_modules/@devicescript/cli/built/devicescript-cli.cjs:1955:16)
at Command3._parseCommand (/some/user/projectX/node_modules/@devicescript/cli/built/devicescript-cli.cjs:2044:31)
at /some/user/projectX/node_modules/@devicescript/cli/built/devicescript-cli.cjs:1874:31
at Command3._chainOrCall (/some/user/projectX/node_modules/@devicescript/cli/built/devicescript-cli.cjs:1955:16)
at Command3._dispatchSubcommand (/some/user/projectX/node_modules/@devicescript/cli/built/devicescript-cli.cjs:1870:27)
at Command3._parseCommand (/some/user/projectX/node_modules/@devicescript/cli/built/devicescript-cli.cjs:2015:23)
at Command3.parse (/some/user/projectX/node_modules/@devicescript/cli/built/devicescript-cli.cjs:1738:14)
at Object.mainCli (/some/user/projectX/node_modules/@devicescript/cli/built/devicescript-cli.cjs:491407:11) {
code: 'MODULE_NOT_FOUND',
requireStack: [
'/some/user/projectX/node_modules/@devicescript/cli/built/devicescript-cli.cjs',
'/some/user/projectX/node_modules/@devicescript/cli/devicescript'
]
} |
Also, If you need help with "undusting" let me know. I'll have some spare time on the weekend, so I can take a look at it (just not sure if ppl outside of Microsoft are allowed to contribute - big tech often has some specific rules even when it comes to open source 😅 ) |
Try npm installing the usb package separately. It’s one of those native package that we don’t automatically install. If you’re lucky it installs on your os…
Otherwise we’ll have to go through the devtools -> webusb route which is surprisingly more reliable.
…________________________________
From: Dawid Wojda ***@***.***>
Sent: Thursday, October 26, 2023 12:26:05 PM
To: microsoft/devicescript ***@***.***>
Cc: Comment ***@***.***>; Subscribed ***@***.***>
Subject: Re: [microsoft/devicescript] No DeviceScript Managers found (Issue #651)
Also, If you need help with "undusting" let me know 😄 I'll have some spare time on the weekend, so I can take a look at it
—
Reply to this email directly, view it on GitHub<#651 (comment)> or unsubscribe<https://github.com/notifications/unsubscribe-auth/AA73QKJ7RV3UG6KMKWSZCNDYBK2M5BFKMF2HI4TJMJ2XIZLTSSBKK5TBNR2WLJDUOJ2WLJDOMFWWLO3UNBZGKYLEL5YGC4TUNFRWS4DBNZ2F6YLDORUXM2LUPGBKK5TBNR2WLJDUOJ2WLJDOMFWWLLTXMF2GG2C7MFRXI2LWNF2HTAVFOZQWY5LFUVUXG43VMWSG4YLNMWVXI2DSMVQWIX3UPFYGLAVFOZQWY5LFVIZTSMRYGAZTOOJYGOSG4YLNMWUWQYLTL5WGCYTFNSWHG5LCNJSWG5C7OR4XAZNMJFZXG5LFINXW23LFNZ2KM5DPOBUWG44TQKSHI6LQMWVHEZLQN5ZWS5DPOJ42K5TBNR2WLKJUGY4TQNJXGUZTJAVEOR4XAZNFNFZXG5LFUV3GC3DVMWVDCOJWGM4DINJVGM4IFJDUPFYGLJLMMFRGK3FFOZQWY5LFVIZTSMRYGAZTOOJYGOTXI4TJM5TWK4VGMNZGKYLUMU>.
You are receiving this email because you commented on the thread.
Triage notifications on the go with GitHub Mobile for iOS<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675> or Android<https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
|
We'll take the help! |
Just installed Now I'm curious, what do you mean by this
can we upload code to the board via browser? I know the WebUSB standard, but wasn't aware that DS somehow supports it |
Oopsies, the rp2040 uses serial so try adding "--serial" which will require to npm install serialport (another native package) |
Check out https://microsoft.github.io/devicescript/api/cli#build-watch essentially devtools can act as a bridge between browser + webusb/webserial and the cli. We use this to flash a device locally while deving in a container |
hah, you right! Now it works as intended! |
keeping this bug open to track updating the docs / cli error messages |
I started digging in code, wanted to fix messages but I don't get this flow, maybe you can help me understand: in cli devtools we have something like this: const transports = createTransports(options)
const bus = new JDBus(transports, {
client: false,
disableRoleManager: true,
proxy: true,
}) nevertheless, all transports are optional and configured from cli options, this is the content of the above function: export function createTransports(options: TransportsOptions) {
const transports: Transport[] = []
if (options.usb) transports.push(createUSB())
if (options.serial) transports.push(createSerial())
if (options.spi) transports.push(createSPI())
return transports
} but without transport selected cli will throw |
these are the "native" transports, assuming your OS is physically connected to the hardware. devtools also opens up a websocket server, and add websocket transport that allows to connect to the device via webusb/webserial and marshal the jacdac packets through the web socket. So the message "no devicescript managers found" really means: we could not find any devicescript device (e.g. has the DeviceScriptManager service) to flash the devicescript bytecode to. |
okay, so let's assume that I'm leaving it as it is, without any native os transport defined - what should happened next? Because now, when I run
So, shouldn't it be added in initial phase to |
Looks like the simulator thinks it is inside of vscode (where we hide the connect button). This should only happen when |
Ok this change will start a dashboard with a connection string for devtools --> a4b905d . It also adds a link to the "connection helper" page that solely there to connect to a device. |
So you need to run
|
here is where the websocket is opened devicescript/cli/src/deploy.ts Line 29 in c1ae7f5
|
Also, another thing with transports - when any of native transports is enabled then it looks like it causes errors on dashboard side and you are unable to connect both from native and WebUSB side. So, maybe there should be some kind of switch in cli which tells which transport user wants to use, and by default it can be |
I've simplified the devtools page as a lot of the content was quite outdated (it was built pre-vscode). |
I've rephrased the "no devicemanager found" messages and added an entry in errors.mdx. |
More docs about the flags at 207858a |
Now that is interesting :)
This is a shame and probably due to the winusb support in chrome versus only libusb in node-usb. |
@thegecko that being said, most of our current devicescript board are using serial (and serialport) so we haven't been try to test node-usb so much. |
@dawiidio closing, please reopen if we still need to improve this. |
Describe the bug
I'm trying to use DS via cli, I started project with
npx
command but while runningnpm start
I can see errorDeploy error: No DeviceScript Managers found.
. I've been looking for managers in docs but couldn't find anything like this in nomenclature, this is the only one reference which says that it is some king of internal thing. https://microsoft.github.io/devicescript/api/clients/devicescriptmanagerTo Reproduce
npx --yes @devicescript/cli@latest init
Device: MacBook Pro M2
Board: RPI Pico
Expected behavior
it should setup working example out of the box
The text was updated successfully, but these errors were encountered: