expo / turtle

Standalone app builder service
MIT License
385 stars 29 forks source link

apk build: Failed to fetch manifest from www #354

Closed mRcSchwering closed 2 years ago

mRcSchwering commented 2 years ago

New Issue Checklist

Issue Description

Hi, I am new to building android apps with expo so maybe this is not a bug but an error on my side. I created an Expo account (user smrc), created a project (slug ankerwache), and ran into this issue when trying to expo build. So, I thought I'm going to use this turtle-cli approach.

When I run turtle build I get Failed to fetch manifest from www. It looks like the manifest cannot be found (404 for https://exp.host:443/@smrc/ankerwache). However, if I type the URL into my browser I can see my project.

Command executed
turtle build:android -t apk -m debug -u smrc -p <mypassword>
Complete output when running turtle, including the stack trace and command used
 Nov 4 10:25:34 turtle[16205] ERROR: Error: Request failed with status code 404
    at createError (/home/marc/.config/yarn/global/node_modules/axios/lib/core/createError.js:16:15)
    at settle (/home/marc/.config/yarn/global/node_modules/axios/lib/core/settle.js:17:12)
    at IncomingMessage.handleStreamEnd (/home/marc/.config/yarn/global/node_modules/axios/lib/adapters/http.js:260:11)
    at IncomingMessage.emit (node:events:406:35)
    at IncomingMessage.emit (node:domain:475:12)
    at endReadableNT (node:internal/streams/readable:1343:12)
    at processTicksAndRejections (node:internal/process/task_queues:83:21) {
  config: {
    url: 'https://exp.host:443/@smrc/ankerwache',
    method: 'get',
    headers: {
      Accept: 'application/expo+json,application/json',
      'Exponent-SDK-Version': '43.0.0',
      'Exponent-Platform': 'android',
      'Expo-Release-Channel': 'default',
      'User-Agent': 'axios/0.21.1'
    },
    transformRequest: [ [Function: transformRequest] ],
    transformResponse: [ [Function: transformResponse] ],
    timeout: 0,
    adapter: [Function: httpAdapter],
    xsrfCookieName: 'XSRF-TOKEN',
    xsrfHeaderName: 'X-XSRF-TOKEN',
    maxContentLength: -1,
    maxBodyLength: -1,
    validateStatus: [Function: validateStatus],
    data: undefined
  },
  request:  ClientRequest {
    _events: [Object: null prototype] {
      abort: [Function (anonymous)],
      aborted: [Function (anonymous)],
      connect: [Function (anonymous)],
      error: [Function (anonymous)],
      socket: [Function (anonymous)],
      timeout: [Function (anonymous)],
      prefinish: [Function: requestOnPrefinish]
    },
    _eventsCount: 7,
    _maxListeners: undefined,
    outputData: [],
    outputSize: 0,
    writable: true,
    destroyed: false,
    _last: true,
    chunkedEncoding: false,
    shouldKeepAlive: false,
    _defaultKeepAlive: true,
    useChunkedEncodingByDefault: false,
    sendDate: false,
    _removedConnection: false,
    _removedContLen: false,
    _removedTE: false,
    _contentLength: 0,
    _hasBody: true,
    _trailer: '',
    finished: true,
    _headerSent: true,
    _closed: false,
    socket: TLSSocket {
      _tlsOptions: [Object],
      _secureEstablished: true,
      _securePending: false,
      _newSessionPending: false,
      _controlReleased: true,
      secureConnecting: false,
      _SNICallback: null,
      servername: 'exp.host',
      alpnProtocol: false,
      authorized: true,
      authorizationError: null,
      encrypted: true,
      _events: [Object: null prototype],
      _eventsCount: 10,
      connecting: false,
      _hadError: false,
      _parent: null,
      _host: 'exp.host',
      _readableState: [ReadableState],
      _maxListeners: undefined,
      _writableState: [WritableState],
      allowHalfOpen: false,
      _sockname: null,
      _pendingData: null,
      _pendingEncoding: '',
      server: undefined,
      _server: null,
      ssl: [TLSWrap],
      _requestCert: true,
      _rejectUnauthorized: true,
      parser: null,
      _httpMessage: [Circular *1],
      [Symbol(res)]: [TLSWrap],
      [Symbol(verified)]: true,
      [Symbol(pendingSession)]: null,
      [Symbol(async_id_symbol)]: 233,
      [Symbol(kHandle)]: [TLSWrap],
      [Symbol(kSetNoDelay)]: false,
      [Symbol(lastWriteQueueSize)]: 0,
      [Symbol(timeout)]: null,
      [Symbol(kBuffer)]: null,
      [Symbol(kBufferCb)]: null,
      [Symbol(kBufferGen)]: null,
      [Symbol(kCapture)]: false,
      [Symbol(kBytesRead)]: 0,
      [Symbol(kBytesWritten)]: 0,
      [Symbol(connect-options)]: [Object],
      [Symbol(RequestTimeout)]: undefined
    },
    _header: 'GET /@smrc/ankerwache HTTP/1.1\r\n' +
      'Accept: application/expo+json,application/json\r\n' +
      'Exponent-SDK-Version: 43.0.0\r\n' +
      'Exponent-Platform: android\r\n' +
      'Expo-Release-Channel: default\r\n' +
      'User-Agent: axios/0.21.1\r\n' +
      'Host: exp.host\r\n' +
      'Connection: close\r\n' +
      '\r\n',
    _keepAliveTimeout: 0,
    _onPendingData: [Function: nop],
    agent: Agent {
      _events: [Object: null prototype],
      _eventsCount: 2,
      _maxListeners: undefined,
      defaultPort: 443,
      protocol: 'https:',
      options: [Object: null prototype],
      requests: [Object: null prototype] {},
      sockets: [Object: null prototype],
      freeSockets: [Object: null prototype] {},
      keepAliveMsecs: 1000,
      keepAlive: false,
      maxSockets: Infinity,
      maxFreeSockets: 256,
      scheduling: 'lifo',
      maxTotalSockets: Infinity,
      totalSocketCount: 1,
      maxCachedSessions: 100,
      _sessionCache: [Object],
      [Symbol(kCapture)]: false
    },
    socketPath: undefined,
    method: 'GET',
    maxHeaderSize: undefined,
    insecureHTTPParser: undefined,
    path: '/@smrc/ankerwache',
    _ended: true,
    res: IncomingMessage {
      _readableState: [ReadableState],
      _events: [Object: null prototype],
      _eventsCount: 3,
      _maxListeners: undefined,
      socket: [TLSSocket],
      httpVersionMajor: 1,
      httpVersionMinor: 1,
      httpVersion: '1.1',
      complete: true,
      rawHeaders: [Array],
      rawTrailers: [],
      aborted: false,
      upgrade: false,
      url: '',
      method: null,
      statusCode: 404,
      statusMessage: 'Not Found',
      client: [TLSSocket],
      _consuming: false,
      _dumped: false,
      req: [Circular *1],
      responseUrl: 'https://exp.host:443/@smrc/ankerwache',
      redirects: [],
      [Symbol(kCapture)]: false,
      [Symbol(kHeaders)]: [Object],
      [Symbol(kHeadersCount)]: 10,
      [Symbol(kTrailers)]: null,
      [Symbol(kTrailersCount)]: 0,
      [Symbol(RequestTimeout)]: undefined
    },
    aborted: false,
    timeoutCb: null,
    upgradeOrConnect: false,
    parser: null,
    maxHeadersCount: null,
    reusedSocket: false,
    host: 'exp.host',
    protocol: 'https:',
    _redirectable: Writable {
      _writableState: [WritableState],
      _events: [Object: null prototype],
      _eventsCount: 2,
      _maxListeners: undefined,
      _options: [Object],
      _ended: true,
      _ending: true,
      _redirectCount: 0,
      _redirects: [],
      _requestBodyLength: 0,
      _requestBodyBuffers: [],
      _onNativeResponse: [Function (anonymous)],
      _currentRequest: [Circular *1],
      _currentUrl: 'https://exp.host:443/@smrc/ankerwache',
      [Symbol(kCapture)]: false
    },
    [Symbol(kCapture)]: false,
    [Symbol(kNeedDrain)]: false,
    [Symbol(corked)]: 0,
    [Symbol(kOutHeaders)]: [Object: null prototype] {
      accept: [Array],
      'exponent-sdk-version': [Array],
      'exponent-platform': [Array],
      'expo-release-channel': [Array],
      'user-agent': [Array],
      host: [Array]
    }
  },
  response: {
    status: 404,
    statusText: 'Not Found',
    headers: {
      date: 'Thu, 04 Nov 2021 09:25:34 GMT',
      'content-type': 'text/plain; charset=utf-8',
      'content-length': '118',
      connection: 'close',
      'strict-transport-security': 'max-age=31536000; includeSubDomains'
    },
    config: {
      url: 'https://exp.host:443/@smrc/ankerwache',
      method: 'get',
      headers: [Object],
      transformRequest: [Array],
      transformResponse: [Array],
      timeout: 0,
      adapter: [Function: httpAdapter],
      xsrfCookieName: 'XSRF-TOKEN',
      xsrfHeaderName: 'X-XSRF-TOKEN',
      maxContentLength: -1,
      maxBodyLength: -1,
      validateStatus: [Function: validateStatus],
      data: undefined
    },
    request:  ClientRequest {
      _events: [Object: null prototype],
      _eventsCount: 7,
      _maxListeners: undefined,
      outputData: [],
      outputSize: 0,
      writable: true,
      destroyed: false,
      _last: true,
      chunkedEncoding: false,
      shouldKeepAlive: false,
      _defaultKeepAlive: true,
      useChunkedEncodingByDefault: false,
      sendDate: false,
      _removedConnection: false,
      _removedContLen: false,
      _removedTE: false,
      _contentLength: 0,
      _hasBody: true,
      _trailer: '',
      finished: true,
      _headerSent: true,
      _closed: false,
      socket: [TLSSocket],
      _header: 'GET /@smrc/ankerwache HTTP/1.1\r\n' +
        'Accept: application/expo+json,application/json\r\n' +
        'Exponent-SDK-Version: 43.0.0\r\n' +
        'Exponent-Platform: android\r\n' +
        'Expo-Release-Channel: default\r\n' +
        'User-Agent: axios/0.21.1\r\n' +
        'Host: exp.host\r\n' +
        'Connection: close\r\n' +
        '\r\n',
      _keepAliveTimeout: 0,
      _onPendingData: [Function: nop],
      agent: [Agent],
      socketPath: undefined,
      method: 'GET',
      maxHeaderSize: undefined,
      insecureHTTPParser: undefined,
      path: '/@smrc/ankerwache',
      _ended: true,
      res: [IncomingMessage],
      aborted: false,
      timeoutCb: null,
      upgradeOrConnect: false,
      parser: null,
      maxHeadersCount: null,
      reusedSocket: false,
      host: 'exp.host',
      protocol: 'https:',
      _redirectable: [Writable],
      [Symbol(kCapture)]: false,
      [Symbol(kNeedDrain)]: false,
      [Symbol(corked)]: 0,
      [Symbol(kOutHeaders)]: [Object: null prototype]
    },
    data: 'Experience "@smrc/ankerwache" for platform "android" and release channel "default" does not exist or is not published.'
  },
  isAxiosError: true,
  toJSON: [Function: toJSON]
}
  platform: "android"
  buildPhase: "reading manifest"
Nov 4 10:25:34 turtle[16205] ERROR: Failed to build standalone app
  err: Error: Failed to fetch manifest from www
      at Object.getManifestAsync (/@expo/xdl@59.1.7/src/detach/ExponentTools.ts:72:11)
      at processTicksAndRejections (node:internal/process/task_queues:96:5)
      at buildJobObject (/home/marc/.config/yarn/global/node_modules/turtle-cli/src/bin/utils/builder.ts:145:20)
      at /home/marc/.config/yarn/global/node_modules/turtle-cli/src/bin/utils/builder.ts:82:12
      at Command. (/home/marc/.config/yarn/global/node_modules/turtle-cli/src/bin/index.ts:23:12)
  platform: "android"
 

Environment

   Expo CLI 4.12.11 environment info:
    System:
      OS: Linux 5.11 Ubuntu 20.04.2 LTS (Focal Fossa)
      Shell: 5.0.17 - /bin/bash
    Binaries:
      Node: 16.9.0 - /usr/local/bin/node
      Yarn: 1.22.15 - /usr/bin/yarn
      npm: 7.21.1 - /usr/local/bin/npm
    npmPackages:
      expo: ~43.0.0 => 43.0.1 
      react: 17.0.1 => 17.0.1 
      react-dom: 17.0.1 => 17.0.1 
      react-native: 0.64.2 => 0.64.2 
      react-native-web: 0.17.1 => 0.17.1 
    Expo Workflow: managed
wkozyra95 commented 2 years ago

you need to either publish your js with expo publish or build a bundle with expo export and self-host it. If you don't want to use OTA updates you can just set up temporary hosting for the time of the build and kill it after the fact(e.g. with ngrok)

btw, a few days ago we released a new build service that also has local build mode like tutle-cli, I recommend switching especially if you just starting https://docs.expo.dev/build/introduction/ https://docs.expo.dev/build-reference/local-builds/