Android standalone app fails to load

#1

Hello,

I’ve built Android standalone app and deployed to Google Playstore, but the app fails to load, stays at loading screen indefinitely (flashing loading logo and 'Made with Expo` text at the bottom)

I’m not sure how to debug this, since opening pusblished version via Expo app still works.

The apk build published on Playstore worked 2 days ago though, only stopped working since yesterday,

Any help will be much appreciated. Thank you.

app.json content:

{
  "expo": {
    "name": "UET News",
    "slug": "uet-hybrid",
    "version": "1.0.0",
    "description": "No description",
    "privacy": "unlisted",
    "sdkVersion": "18.0.0",
    "android": {
      "package": "vn.com.bhtech.uet",
      "versionCode": 2
    },
    "icon": "./app/assets/iconsAssets/app-icon.png",
    "ios": {
      "buildNumber": "2",
      "bundleIdentifier": "vn.com.bhtech.uet",
      "supportsTablet": false
    },
    "loading": {
      "hideExponentText": false,
      "icon": "./app/assets/iconsAssets/loading-icon.png"
    },
    "notification": {
      "color": "#000000",
      "icon": "./app/assets/iconsAssets/notification-icon.png"
    },
    "packagerOpts": {
      "assetExts": ["otf", "ttf"]
    },
    "primaryColor": "#cccccc"
  }
}
#2

Hi! Could you paste the URL to your Expo project? Also, could you upload the APK from the standalone app somewhere and provide a link for that?

#3

@dikaiosune Sure, the link is at:

exp://exp.host/@duyphambhtech/uet-hybrid

And APK can be downloaded here:

https://i.diawi.com/UmrzBr / @expo4rum

If there’s anything else, let me know.

#4

Just to note, iOS standalone app still works, should be available on Apple App Store soon

#5

Hi! Sorry about the delay here. We’re looking into this, hopefully @jesse will have some news to share soon.

1 Like
#6

@dikaiosune I’m having the same issue with a second app

https://expo.io/@duyphambhtech/hrd-hybrid

https://i.diawi.com/EVk5mV / bh@132

Any help is much appreciated.

#7

@dikaiosune @jesse
I’ve finally resolved this problem. This might be due to old API Notifications.getExponentPushTokenAsync

Complete old code (which hangs in Android standalone app, but runs normally in Expo app & iOS standalone app)

import { Permissions, Notifications } from 'expo'

export default async () => {
  // Android remote notification permissions are granted during the app
  // install, so this will only ask on iOS
  let { status } = await Permissions.askAsync(Permissions.REMOTE_NOTIFICATIONS)

  // Stop here if the user did not grant permissions
  if (status !== 'granted') {
    return Promise.resolve(null)
  }

  // Get the token that uniquely identifies this device
  let token = await Notifications.getExponentPushTokenAsync()

  __DEV__ && console.log('token', token)
  // TODO: do something with received token

  return Promise.resolve(token)
}

Similar to code in https://github.com/expo/new-project-template/blob/master/api/registerForPushNotificationsAsync.js

Changing to getExpoPushTokenAsync resolves the problem.

FYI

1 Like