SDK38 Suddenly asking to access photos

Please provide the following:

  1. 38:
  2. iOS

Hi, I have stumbled upon a weird issue.
I have upgraded to SDK38, no changes to the code, built, then released to test-flight, the app now asks for access to photos.
I have made 0 changes to the code other than updating expo and relative libraries.

I did a project-wide search for CAMERA_ROLL and nothing came back… is this a known issue or am I missing something?

Thanks

Hey @goodonyou,

Can you share your package.json file here?

Cheers,
Adam

1 Like

@adamjnav

package.json

{
  "expo": {
    "name": "***",
    "slug": "***",
    "privacy": "unlisted",
    "platforms": [
      "ios",
      "android"
    ]
  }
}

app.config.js

// eslint-disable-next-line arrow-body-style
export default ({ config }) => {
  // Merges original config from app.json with the rest
  return {
    ...config,
    version: 'x.x.x',
    facebookScheme: '***',
    facebookAppId: '***',
    facebookDisplayName: '***',
    orientation: 'portrait',
    splash: {
      image: './assets/splash.png',
      resizeMode: 'contain',
      backgroundColor: '#1B1B1B',
    },
    updates: {
      enabled: true,
      checkAutomatically: 'ON_LOAD',
      fallbackToCacheTimeout: 0,
    },
    assetBundlePatterns: [
      '**/*',
    ],
    notification: {
      icon: './assets/android/notification-xxxhdpi.png',
      color: '#ffffff',
      iosDisplayInForeground: true,
      androidMode: 'default',
      androidCollapsedTitle: '#{unread_notifications} new events',
    },
    ios: {
      bundleIdentifier: '***',
      buildNumber: '109',
      icon: './assets/icon_ios.png',
      supportsTablet: true,
      usesIcloudStorage: false,
    },
    android: {
      package: '***',
      versionCode: 500014,
      permissions: [
        'ACCESS_COARSE_LOCATION',
        'ACCESS_FINE_LOCATION',
      ],
      icon: './assets/icon_android.png',
      splash: {
        backgroundColor: '#1B1B1B',
        resizeMode: 'contain',
        xxxhdpi: './assets/android/res/drawable-xxxhdpi/shell_launch_background_image.png',
      },
      adaptiveIcon: {
        foregroundImage: './assets/android/androidAdaptiveIcon.png',
        backgroundColor: '#000000',
      },
      googleServicesFile: './google-services.json',
      useNextNotificationsApi: false,
    },
    androidStatusBar: {
      translucent: true,
    },
    hooks: {
      postPublish: [
        {
          file: 'sentry-expo/upload-sourcemaps',
          config: {
            organization: '***',
            project: '***',
            authToken: '***'
          },
        },
      ],
    },
  };
};

Apologies for bumping this, but I would like to undertand… I feel there is a but in the build process somewhere.
Only thing I can think of is that I did one build including the iOS firebase config, then I removed it thinking it might’ve been the culprit.

Any ideas?

Hey @goodonyou, you shared your app.json/config.js but not your package.json. Can you share that please?

HI Adam, you are indeed correct, in the meantime I have tracked down the root cause, which is puzzling to say the least.

import React from 'react';
import { Image } from 'react-native-expo-image-cache';

// preview can be a local image or a data uri
const preview = { uri: ' data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAyAAAAJYCAMAAACtqHJCAAABAlBMVEXp7vG6vsHGy83m6+7b4OO7v8Lo7fDJzdDO0tW/w8bj6OvM0dTn7O+9wcS8wMPHy87k6ezg5ejZ3uHP1Nfb3+LN0dTKztHLz9Li5+rEyMvQ1Nfa3+Ld4uXFyczk6evl6u2+wsXR1tnAxMfJztHX3N/BxcjGys3Q1djR1djh5unCxsnDx8rIzM/M0NPO09bP09bX297d4eS/xMfGy87T2NvU2dzV2dzW2t3Y3N/Z3eDe4uXAxcjKz9LS1tnS19rY3eDc4eTh5ejm6u3HzM/L0NPU2NvW297BxsnN0tXT19rV2t3a3uHc4OPe4+bf4+bf5Ofi5unDyMvEyczFys3IzdDY3d9iVWyuAAAOnUlEQVR42uzAgQAAAACAoP2pF6kAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGD27m6niSAMwPB8YBdLWgHkT0hTi1aEIgSMoBA1xKiJRg68/4vRWCi0CLtFDmT3eS5hNm86szOzBQAAAAAAgP/N5NG33e1evRncc83jJ0urb+eyxF1pLDzcCsql1ur8EMkdaLybqgWl1Fw8SvyTlV2TqlLrfp5M3NbcUlB2j1bbiduYXg4qkUinkRhX1rH0qIz6fGI8p1+DCpmaTRSXvQ+q5elCoqj266ByVm2LFHSyHlTQjDe+hezZ+qioLQu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luoNs2Z+fiETM0FzZDuWHxfVNzNsjKH97ZfQeu4+qxEGvsJ7Se1dM5Ha+2NxfgWtuc9BfWXzB4mryXf8PaSessk3JufX4lPv2ZafUNVKtrb6woOr69T6uPx69svkLW627nBmfXffUysAAAAAAAAAAAAAAAAAAAAAgH/twAEJAAAAgKD/r9sRKAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA8BKSSasYoOfLJAAAAAElFTkSuQmCC' };


const FastImage = ({ source, style }) => {
  const { uri } = source;
  return (
    <Image style={style} {...{ preview, uri }} />
  );
};

export default FastImage;

This is the package: https://github.com/wcandillon/react-native-expo-image-cache

The issue is the base64 encoded preview! If I switch it to a local/remote image it does not happen.

The package worked fine in SDK37 and works fine in Android SDK38, but triggers a request for CAMERA_ROLL permission in iOS SDK38.

I feel like there is something funky going on in expo.

Looking at the code of the package, preview is loaded simply as a React Native image:

{!!preview && (
          <RNImage
            source={preview}
            style={computedStyle}
            blurRadius={Platform.OS === "android" ? 0.5 : 0}
            {...otherProps}
          />
        )}

Thanks

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