pxt-arcade icon indicating copy to clipboard operation
pxt-arcade copied to clipboard

Stuck on loading screen - Version spec mismatch error in console log

Open eanders-ms opened this issue 4 years ago • 3 comments

Describe the bug When an Arcade project and a referenced extension both reference a common extension, but at different commit hashes, the project throws an exception on load:

Uncaught Error: Version spec mismatch on pxt-trig
    at Object.p.userError (https://pxt.azureedge.net/blob/e2a3bb701b4c697f15c9e346a5b529e9dc989a08/pxtapp.js:1:30152)
    at https://pxt.azureedge.net/blob/e2a3bb701b4c697f15c9e346a5b529e9dc989a08/pxtapp.js:1:201303
From previous event:
    at S.R [as _captureStackTrace] (https://pxt.azureedge.net/blob/f0f202119ad689109c8a33a886d7da411cf502df/main.js:1:894515)
    at S._then (https://pxt.azureedge.net/blob/f0f202119ad689109c8a33a886d7da411cf502df/main.js:1:920016)
    at S.then (https://pxt.azureedge.net/blob/f0f202119ad689109c8a33a886d7da411cf502df/main.js:1:918379)
    at U.loadHeaderAsync (https://pxt.azureedge.net/blob/f0f202119ad689109c8a33a886d7da411cf502df/main.js:1:32364)
    at e.chgHeader (https://pxt.azureedge.net/blob/f0f202119ad689109c8a33a886d7da411cf502df/main.js:1:616737)
    at u.handleCardClick (https://pxt.azureedge.net/blob/f0f202119ad689109c8a33a886d7da411cf502df/main.js:1:629066)
    at e.handleClick (https://pxt.azureedge.net/blob/f0f202119ad689109c8a33a886d7da411cf502df/main.js:1:632116)
    at c (https://pxt.azureedge.net/blob/f0f202119ad689109c8a33a886d7da411cf502df/main.js:1:193679)
    at Object.<anonymous> (https://pxt.azureedge.net/blob/f0f202119ad689109c8a33a886d7da411cf502df/main.js:1:1389869)
    at _ (https://pxt.azureedge.net/blob/f0f202119ad689109c8a33a886d7da411cf502df/main.js:1:1389907)
    at https://pxt.azureedge.net/blob/f0f202119ad689109c8a33a886d7da411cf502df/main.js:1:1390053
    at x (https://pxt.azureedge.net/blob/f0f202119ad689109c8a33a886d7da411cf502df/main.js:1:1390139)
    at T (https://pxt.azureedge.net/blob/f0f202119ad689109c8a33a886d7da411cf502df/main.js:1:1390584)
    at C (https://pxt.azureedge.net/blob/f0f202119ad689109c8a33a886d7da411cf502df/main.js:1:1390396)
    at A (https://pxt.azureedge.net/blob/f0f202119ad689109c8a33a886d7da411cf502df/main.js:1:1390744)
    at xn (https://pxt.azureedge.net/blob/f0f202119ad689109c8a33a886d7da411cf502df/main.js:1:1417690)
    at le (https://pxt.azureedge.net/blob/f0f202119ad689109c8a33a886d7da411cf502df/main.js:1:1504471)
    at Tn (https://pxt.azureedge.net/blob/f0f202119ad689109c8a33a886d7da411cf502df/main.js:1:1418295)
    at Nn (https://pxt.azureedge.net/blob/f0f202119ad689109c8a33a886d7da411cf502df/main.js:1:1419252)
    at An (https://pxt.azureedge.net/blob/f0f202119ad689109c8a33a886d7da411cf502df/main.js:1:1418540)
    at s.unstable_runWithPriority (https://pxt.azureedge.net/blob/f0f202119ad689109c8a33a886d7da411cf502df/main.js:1:1509262)
    at Gi (https://pxt.azureedge.net/blob/f0f202119ad689109c8a33a886d7da411cf502df/main.js:1:1434148)

Visual Aid In case it helps, here is my project dependency graph in visual form:

                 +--------------------+
                 |                    |
      +----------+  My Arcade Project |
      |          |                    |
      |          +-----------+--------+
      |                      |
      |                      |
      |         +------------v-------------------------------+
      |         |                                            |
      |         | pxt-geometry extension                     |
      |         | https://github.com/eanders ms/pxt-geometry |
      |         |                                            |
      |         +------------+-------------------------------+
      |                      |
    v1.0                   v1.1
      |                      |
+-----v----------------------v---------------+
|                                            |
| pxt-trig                                   |
| https://github.com/eanders-ms/pxt-trig     |
|                                            |
+--------------------------------------------+
  • OS: Windows 10
  • Browser: Chrome 83

Expected behavior The editor would gracefully handle the exception and show a message stating the project failed to load.

Additional context I'm also wondering if I can recover my project somehow. Can I edit it in local storage to remove the project's dependency on the common extension?

Possibly related: https://github.com/microsoft/pxt-arcade/issues/1673

eanders-ms avatar Jun 28 '20 01:06 eanders-ms

I don't know for certain if the double-reference is the cause of the version spec mismatch. It's my best guess.

eanders-ms avatar Jun 28 '20 01:06 eanders-ms

It does seem to be due to package version mismatch. Here's the code: https://github.com/microsoft/pxt/blob/9c8eb0ff3434ef7b56bbca644e288900428140fc/pxtlib/package.ts#L646

eanders-ms avatar Jun 28 '20 01:06 eanders-ms

Probably crashing on load, add ?dbg=1 and look at the console


From: Eric Anderson [email protected] Sent: Saturday, June 27, 2020 6:20:48 PM To: microsoft/pxt-arcade [email protected] Cc: Subscribed [email protected] Subject: Re: [microsoft/pxt-arcade] Stuck on loading screen - Version spec mismatch error in console log (#2027)

It does seem to be due to package version mismatch. Here's the code: https://github.com/microsoft/pxt/blob/9c8eb0ff3434ef7b56bbca644e288900428140fc/pxtlib/package.ts#L646https://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fmicrosoft%2Fpxt%2Fblob%2F9c8eb0ff3434ef7b56bbca644e288900428140fc%2Fpxtlib%2Fpackage.ts%23L646&data=02%7C01%7Cjhalleux%40microsoft.com%7C910af8f083ee4156640e08d81b017df5%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637289040503010161&sdata=ItGG14hurTiQVXLdRKnSQfu8WPqCNKAYeRLWHNJ75Lw%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%2Fpxt-arcade%2Fissues%2F2027%23issuecomment-650663126&data=02%7C01%7Cjhalleux%40microsoft.com%7C910af8f083ee4156640e08d81b017df5%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637289040503010161&sdata=aXfWTpGGLji%2Bre8ccCs3RoQsuk6E7eWpohOFHxCBoPg%3D&reserved=0, or unsubscribehttps://nam06.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FAA73QKIQ25Y6DJA4WYKSYTTRY2LHBANCNFSM4OKI26HQ&data=02%7C01%7Cjhalleux%40microsoft.com%7C910af8f083ee4156640e08d81b017df5%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7C637289040503020116&sdata=Ah3bpHvbEHLryLwgMobj3yu%2B8O4zYf8ucBDq7liwBv0%3D&reserved=0.

pelikhan avatar Jun 28 '20 05:06 pelikhan