microsoft / jacdac

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

Getting "Access Denied" message when trying to connect to microbit #786

Open eanders-ms opened 3 years ago

eanders-ms commented 3 years ago

Describe the bug With a single browser, single tab open, when I try to connect to the microbit, I get an "Access Denied" error. In the dev console I see this exception:

{message: 'Access denied.', stack: undefined, name: 'SecurityError', jacdacName: undefined}

Repros in both Edge and Chrome.

OS: Windows 11

To Reproduce Steps to reproduce the behavior:

  1. Close all browsers
  2. Open a single browser, single tab
  3. Navigate to https://aka.ms/jacdac
  4. Plugin your microbit to USB
  5. In the browser click "Connect"
  6. Go through the flow to connect your microbit
  7. Notice it fails!

Expected behavior It would connect successfully.

Screenshots So far so good, it sees the microbit: image

Microbit appears in the device selection dialog: image

After clicking "Connect", the error appears: image

Dev console output: image

pelikhan commented 3 years ago

Did you flash a microbit without jacdac in it by any chance?

Sent from Outlookhttp://aka.ms/weboutlook


From: Eric Anderson @.> Sent: Monday, October 11, 2021 11:32 AM To: microsoft/jacdac @.> Cc: Subscribed @.***> Subject: [microsoft/jacdac] Getting "Access Denied" message when trying to connect to microbit (#786)

Describe the bug With a single browser, single tab open, when I try to connect to the microbit, I get an "Access Denied" error. In the dev console I see this exception:

{message: 'Access denied.', stack: undefined, name: 'SecurityError', jacdacName: undefined}

Repros in both Edge and Chrome.

OS: Windows 11

To Reproduce Steps to reproduce the behavior:

  1. Close all browsers
  2. Open a single browser, single tab
  3. Navigate to https://aka.ms/jacdachttps://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Faka.ms%2Fjacdac&data=04%7C01%7Cjhalleux%40microsoft.com%7C58bffd139c104597dc1008d98ce57b07%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637695739513536884%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=RZacY6OxFMwwSZ0DpXxHIJl4GhSSP2idAL28Ll7yg9c%3D&reserved=0
  4. Plugin your microbit to USB
  5. In the browser click "Connect"
  6. Go through the flow to connect your microbit
  7. Notice it fails!

Expected behavior It would connect successfully.

Screenshots So far so good, it sees the microbit: [image]https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fuser-images.githubusercontent.com%2F12176807%2F136837369-085456d1-03eb-4a26-a6e0-e97f33bd38fc.png&data=04%7C01%7Cjhalleux%40microsoft.com%7C58bffd139c104597dc1008d98ce57b07%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637695739513536884%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=ewr7k32BGXDzgUp3VqRekhMNxweJsKvDCTGnA5uOSCM%3D&reserved=0

Microbit appears in the device selection dialog: [image]https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fuser-images.githubusercontent.com%2F12176807%2F136837409-fbdd7ef4-6572-425a-838a-4d660a4888e0.png&data=04%7C01%7Cjhalleux%40microsoft.com%7C58bffd139c104597dc1008d98ce57b07%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637695739513546876%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=EoJrNA8lIAPg3hqcHzyFErDIBlqwkwilQjG8DIHcYyg%3D&reserved=0

After clicking "Connect", the error appears: [image]https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fuser-images.githubusercontent.com%2F12176807%2F136837460-65ff80c6-70e5-4256-a186-116126b6654e.png&data=04%7C01%7Cjhalleux%40microsoft.com%7C58bffd139c104597dc1008d98ce57b07%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637695739513546876%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=aJz30zWz5uuVyQKPHU4a3GvsB4fbHSfB9K%2B09LxjwFU%3D&reserved=0

Dev console output: [image]https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fuser-images.githubusercontent.com%2F12176807%2F136837650-062583cb-7616-4d8d-9a9c-131105da509c.png&data=04%7C01%7Cjhalleux%40microsoft.com%7C58bffd139c104597dc1008d98ce57b07%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637695739513556867%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=yOwsHPntVEzrSG5l2RMR7eIVbxA3gwa7%2FKF1DT8hueo%3D&reserved=0

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHubhttps://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fmicrosoft%2Fjacdac%2Fissues%2F786&data=04%7C01%7Cjhalleux%40microsoft.com%7C58bffd139c104597dc1008d98ce57b07%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637695739513556867%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=d61tqCrUCVK9CInFKGDmel73HrW1d1YdroB39cLIJ5o%3D&reserved=0, or unsubscribehttps://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FAA73QKJGOKYABEX6M2BAW6LUGMUTZANCNFSM5FY2KJRA&data=04%7C01%7Cjhalleux%40microsoft.com%7C58bffd139c104597dc1008d98ce57b07%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637695739513566861%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=7pYHmOTZLYW0tB4uWK8EmAdFCDxQuAah6YMXFeFBYKM%3D&reserved=0.

pelikhan commented 3 years ago

I think this might be due to the program on micro:bit not having the Jacdac stack. Need to investigate.

tballmsft commented 3 years ago

if this was the V2 from the kit, it should have been flashed with OOB program, which has the Jacdac stack.

pelikhan commented 3 years ago

Eric mentionned that makecode.microbit.org also had issues with the device. he's looking at this.

pelikhan commented 3 years ago

The message for missing jacdac is different

image

pelikhan commented 3 years ago

We still haven't found why this happened on Eric's machine. Note that Eric sent me his micro:bit and things worked fine here too. This is a generic micro:bit issue. closing here.

dsssssssss9 commented 2 years ago

I had a kind of similar error & found that resetting the Browser Permissions for the Site woked for me!

pelikhan commented 2 years ago

@eanders-ms could you check the permissions for the particular site on your troublesome machine? Looks like we'll need a dedicated webusb troubleshoot page.