microsoft / jacdac

Device and service catalogs for Jacdac.
https://aka.ms/jacdac
Creative Commons Attribution 4.0 International
66 stars 25 forks source link

makecode and jacdac not working together #1244

Closed tballmsft closed 1 year ago

tballmsft commented 1 year ago

Repro

  1. load jacdac extension
  2. connect micro:bit and download empty program
  3. See the following in log:
pxtapp.js:1 

 Failed to execute 'postMessage' on 'DOMWindow': 
The target origin provided ('https://microsoft.github.io') 
does not match the recipient window's origin 
('https://makecode.microbit.org').
tballmsft commented 1 year ago

After the above, then keep getting these messages:


Collect roles failed
eventsource.ts:199 

       JacdacError: no ACK for MS18/3[3]: 0x83 sz=12: 6abc472303208e92aa010000
    at Object.errCb (device.ts:1058:31)
    at resend (device.ts:1006:25)
pelikhan commented 1 year ago

Does this happen when you reload the simulator?

tballmsft commented 1 year ago

yes

pelikhan commented 1 year ago

Does Jacdac work when using https://microsoft.github.io/jacdac-docs/dashboard/ ?

tballmsft commented 1 year ago

Yes. This is the program: https://makecode.microbit.org/_axXJKYKMHF53

tballmsft commented 1 year ago

This program contains jacdac.start(), which fixes the problem: https://makecode.microbit.org/_ahCivULJeYzc

tballmsft commented 1 year ago

We should probably add a block for starting Jacdac to help bootstrap things. The Jacdac blocks don't have any meaningful event for bootstrapping.

pelikhan commented 1 year ago

It should just work with no jacdac as long as the library is pulled in. Something is broken.

Sent from Outlookhttp://aka.ms/weboutlook


From: Tom Ball @.> Sent: Friday, January 27, 2023 2:22 PM To: microsoft/jacdac @.> Cc: Peli de Halleux @.>; Assign @.> Subject: Re: [microsoft/jacdac] makecode and jacdac not working together (Issue #1244)

We should probably add a block for starting Jacdac to help bootstrap things. The Jacdac blocks don't have any meaningful event for bootstrapping.

— Reply to this email directly, view it on GitHubhttps://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fmicrosoft%2Fjacdac%2Fissues%2F1244%23issuecomment-1407135362&data=05%7C01%7Cjhalleux%40microsoft.com%7C6a5489af4f564127af1f08db00b4f67e%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C638104549458836934%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=3hS5PMiVa1ee%2FbvfD%2BAKw6lwdaSY64MAuCb9grElyEI%3D&reserved=0, or unsubscribehttps://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FAA73QKIK5H5NJA3L5DVGQLDWURDB5ANCNFSM6AAAAAAUFQMP4M&data=05%7C01%7Cjhalleux%40microsoft.com%7C6a5489af4f564127af1f08db00b4f67e%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C638104549458836934%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=tpzPzvL0VZuqzwXtZowF4an5IydGVcLjogpRbvvS5b0%3D&reserved=0. You are receiving this because you were assigned.Message ID: @.***>

tballmsft commented 1 year ago

OK. will leave this issue open.