expo-cli 3.1.0: Cannot publish due to "GraphQL error: Cannot destructure property"

Description

After upgrade to expo-cli 3.1.0 and expo SDK v35 I cannot publish any app anymore due to GraphQL error

Expected Behavior

When I click on Publish in the expo-cli devTools (http://localhost:19002/), I expect that popup Publishing will appear for some time and then after successful publishing will be replaced by a URI where I can find the published app.

Observed Behavior

When I click on Publish, assets are successfully optimized, popup with the word “Publishing…” appears and gets stuck. If I am using firefox I see in a firefox console only empty "Error: ", however if I use Chrome, the console provides this kind of error:

index.js:1 Uncaught (in promise) Error: GraphQL error: Cannot destructure property `quality` of 'undefined' or 'null'.
    at new t (index.js:1)
    at e.<anonymous> (index.js:1)
    at u (index.js:1)
    at Object.next (index.js:1)
    at index.js:1
    at new Promise (<anonymous>)
    at l (index.js:1)
    at Object.next (index.js:1)
    at Object.handler (index.js:1)
    at e.processReceivedData (index.js:1)

Sometimes in firefox I also see these errors, but not always:

Firefox can't establish a connection to the server at ws://localhost:19002/NsVLE3MXMFedWlZH5QTe-a1wOVuw4DC5D0KHUe_rYBU/graphql. index.js:1:144825
Firefox can't establish a connection to the server at ws://localhost:19002/NsVLE3MXMFedWlZH5QTe-a1wOVuw4DC5D0KHUe_rYBU/graphql.

Environment

Expo CLI 3.1.0 environment info:
System:
OS: Windows 10
Binaries:
Yarn: 1.16.0 - C:\Program Files (x86)\Yarn\bin\yarn.CMD
npm: 6.11.3 - C:\Users\egidi\AppData\Roaming\npm\npm.CMD
IDEs:
Android Studio: Version 3.0.0.0 AI-171.4443003

Reproducible Demo

  1. Upgrade expo-cli to 3.1.0 and expo to 35.0.0
  2. expo start
  3. Go to localhost:19002
  4. Click “Publish or republish project…” -> “Publish”
  5. Observe the issue

Maybe see if expo-cli 3.1.1 fixes this.

The latest as of today is 3.1.2. Upgrading to this version also did not help…

Looks like the changes from 3.1.1 to 3.1.2 were related to the web rather than mobile.

Does it make a difference if you run expo publish from the command line?

Maybe try from cmd.exe and powershell. If those don’t work then maybe install WSL and Ubuntu and try from the bash prompt. If you do the latter I think you’ll need to install node and expo-cli from within Ubuntu. I don’t have a Windows machine on which I can try this all myself.

1 Like

Actually, it did! Thanks a lot wodin.

At first I got this error
node_modules\expo\AppEntry.js: Cannot find module 'babel-preset-expo'
however after reinstalling the babel-preset-expo module, I was able to successfully publish via command line.

It is a great workaround, but would be still nice if I could use devTools for publishing once again.Maybe next releases will provide a fix.

1 Like

Did you try it from the browser again after you got it working from the command line? Anyway I’m glad you have a workaround :grinning:

Yes, I tried publishing from the browser as well. However it throws the same error.

expo-cli@3.4.0 fixed the issue

1 Like

This topic was automatically closed 20 days after the last reply. New replies are no longer allowed.