expo: [SDK 45] android block permissions warning looped

Summary

Now we can remove permissions from our apps with android.blockedPermissions, that’s fantastic. but what isn’t fantastic is that with it came also a loop in the warning » android: block-permissions: No permissions provided making it be spammed in the terminal.

Managed or bare workflow? If you have ios/ or android/ directories in your project, the answer is bare!

managed

What platform(s) does this occur on?

Android

SDK Version (managed workflow only)

45

Environment

expo-env-info 1.0.3 environment info: System: OS: Linux 5.10 Arch Linux Shell: 5.8.1 - /usr/sbin/zsh Binaries: Node: 16.15.0 - /usr/bin/node Yarn: 1.22.18 - /usr/bin/yarn npm: 8.8.0 - ~/ictio/app/node_modules/.bin/npm npmPackages: expo: ^45.0.0 => 45.0.0 react: 17.0.2 => 17.0.2 react-native: 0.68.1 => 0.68.1 npmGlobalPackages: eas-cli: 0.52.0 expo-cli: 5.4.3 Expo Workflow: managed

Reproducible demo

Create a new project, add a config plugin (such as expo-image-picker), leave android.blockedPermissions empty or don’t define it. You should be able to see the message at least 2 times when initiating a build, and an infinite number of times when running the app with expo start.

repro on upgraded project from SDK 44 repro on clean initialized project on SDK 45

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Reactions: 3
  • Comments: 18 (3 by maintainers)

Most upvoted comments

I’m occurring the same issue.

I can’t reproduce this with expo-cli@5.4.7 and this is resolved in @expo/config-plugins@4.1.5 with this PR which removed the warning entirely.

If you are experiencing this in your project then it is likely that you have a version of @expo/config-plugins installed that is lower than @expo/config-plugins@4.1.5. You can run npm why @expo/config-plugins to see where that comes from.

i am also having the same problem. It’s constantly printing in every 5 sec in terminal and I can’t stop it. My mobile app works fine tho

pic

Hey, @kbrandwijk, the issue occurs exactly as I pointed on the previous comment. here is a repro. This project was upgraded from 44, not clean inited. I’ll test with the clean inited one now.

EDIT: Occurred with the clean inited one too. The conditions seems to be adding a plugin on expo.plugins in app.json or on plugins on app.config.js heres the repro on a clean inited project

Hey, @kbrandwijk, @brentvatne, I noticed that yesterday version 5.4.4 of expo-cli was released, on the changelog it includes the PR that appeared to fix this. After updating the cli today, I still get

~/i/app ❯❯❯ yarn wsl --dev-client                                                                                     main ✱ ◼
yarn run v1.22.18
$ REACT_NATIVE_PACKAGER_HOSTNAME=$(netsh.exe interface ip show address "Wi-Fi" | grep 'IP Address' | sed -r 's/^.*IP Address:\W*//') expo start --dev-client
Starting project at /home/ivopr/ictio/app
» android: block-permissions: No permissions provided
» android: block-permissions: No permissions provided
» android: block-permissions: No permissions provided
Developer tools running on http://localhost:19002
» android: block-permissions: No permissions provided
» android: block-permissions: No permissions provided
Starting Metro Bundler
▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄▄
█ ▄▄▄▄▄ ██▀▀▄▄▀▀▄ ▄▀█▄█▄██▄██▀█ ▄▄▄▄▄ █
█ █   █ █▀███ ▄█▄▀▀    █▀█▀█▀ █ █   █ █
█ █▄▄▄█ █▄▄█▀▀██ ▄ ▄▄█▄ ▄ ▄▀█▄█ █▄▄▄█ █
█▄▄▄▄▄▄▄█▄█ ▀▄█ ▀ █ █▄█▄█▄█ █ █▄▄▄▄▄▄▄█
█ ▄▀▀█▄▄ █ █▄▀▀██ ▄▄▀ █▄ ▄▄ ▀█▀██ ▄▀███
█ █  █▄▄█ ▄▄█▀ ▄▄▄█▄▀▀▄▄▀ █ ▄ ██▄█▀▄  █
███  █▀▄██▀▀▄▄▄█▄ █▄▀▄█▀ █▀█  ▄▄ █▀█▄██
█ ▀▄█▄▄▄▀█ ▀ ▄██▀██ █▀▄▀██▄  █ █▄█ ▀ ▄█
███▀ ▀█▄▀▄█▄▄▀▀▀█▄▄▄▀▄██▀█▄   █▄▀▄▄ ███
██▀▀▀██▄▀▄▀ ▄▀▀█▄█▄█▄█▄▀ █▄█▄▀▀█▄█▀▄▄ █
█▄▄ ▄▀ ▄▀██▄█▄█ ▄█▄ ▀ ██ ▀ ▀ █▄▄   ▄▀▄█
█▄█▀▄▄ ▄▀ ▄█ ▄█▀▀▀██▀▀█▀▀██ ▄▀  ▀█▀▄▄ █
█▀▀▄█▀ ▄█▀▄▄█▀  █▄█▄▄ ▄█▀ ██  ▀▄▀█▄█ ██
█ █▄ ▀▀▄ █▄▀█▀  ▄ ▄▄▀▀▄██▄▄█▄▄█▀ ▀    █
█▄██▄██▄█ █ █▄█▄ ▄█▀▀▄██▀█ ▄█ ▄▄▄ ▄ ▄▄█
█ ▄▄▄▄▄ █  █▀▄▄ ▄▄▄▄▄▀▄▀ ▄▄██ █▄█ ▀▄█ █
█ █   █ ██  ▄▀▀█▀  ▄▀▀██ ▄   ▄  ▄▄ ▄▀ █
█ █▄▄▄█ █▀ ██▀ ▄▄██ ▀▀█████▀█ ▄▀ █▀▄▄ █
█▄▄▄▄▄▄▄█▄▄█▄▄▄█▄██▄▄▄▄█▄▄███▄▄▄██▄██▄█

› Metro waiting on exp+ictiobiometria://expo-development-client/?url=http%3A%2F%2F10.0.0.105%3A8081
› Scan the QR code above with Expo Go (Android) or the Camera app (iOS)

› Press a │ open Android
› Press w │ open web

› Press r │ reload app
› Press m │ toggle menu
› Press d │ show developer tools
› shift+d │ toggle auto opening developer tools on startup (disabled)

› Press ? │ show all commands

Logs for your project will appear below. Press Ctrl+C to exit.
Started Metro Bundler
» android: block-permissions: No permissions provided
» android: block-permissions: No permissions provided
» android: block-permissions: No permissions provided
» android: block-permissions: No permissions provided
» android: block-permissions: No permissions provided
» android: block-permissions: No permissions provided
» android: block-permissions: No permissions provided
» android: block-permissions: No permissions provided
Android Bundling JavaScript [================================                                ] 49%

Not sure if it’s util, but these are the plugins I have declared on app.config.js

    "@react-native-firebase/app",
    "@react-native-firebase/crashlytics",
    "@react-native-firebase/perf",
    "@react-native-google-signin/google-signin",
    "expo-image-picker",
    "expo-location",

Also, this is something I’ve found now, having for example

android: {
    blockedPermissions: ["ACCESS_COARSE_LOCATION"],
    permissions: ["CAMERA", "ACCESS_FINE_LOCATION", "FOREGROUND_SERVICE"],
    ...
  },

will still trigger the warnings

@FatmaMahmoud698 just wait a bit for the next release.

Experiencing the same issue. I also notice it when I go to upload a build. When I build it in EAS - I will see the STDERR output of the same thing.

image

image