Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"Image could not be captured" errors from takePictureAsync. #3020

Closed
AndrewSouthpaw opened this issue Dec 18, 2018 · 4 comments · Fixed by #7144
Closed

"Image could not be captured" errors from takePictureAsync. #3020

AndrewSouthpaw opened this issue Dec 18, 2018 · 4 comments · Fixed by #7144
Assignees
Projects

Comments

@AndrewSouthpaw
Copy link
Contributor

AndrewSouthpaw commented Dec 18, 2018

Environment

  Expo CLI 2.6.14 environment info:
    System:
      OS: macOS 10.14.1
      Shell: 4.4.23 - /usr/local/bin/bash
    Binaries:
      Node: 8.14.0 - ~/.nvm/versions/node/v8.14.0/bin/node
      Yarn: 1.12.3 - /usr/local/bin/yarn
      npm: 6.4.1 - ~/.nvm/versions/node/v8.14.0/bin/npm
    IDEs:
      Xcode: /undefined - /usr/bin/xcodebuild
    npmPackages:
      expo: 30.0.0 => 30.0.0
      react: 16.3.1 => 16.3.1
      react-native: https://github.com/expo/react-native/archive/sdk-30.0.0.tar.gz => 0.55.4
      react-navigation: ^2.18.2 => 2.18.2

App target: iOS and Android

Steps to Reproduce

Our app uses takePictureAsync to capture pictures from the camera. ~5% of the time we're getting Image could not be captured errors for iOS. It doesn't appear to come up for Android. My guess is that the error is coming from here but it's not clear what can cause the error in the first place.

Here's a stack trace:

image

Has anyone else bumped into this issue before? I can't find anything reproducible because it happens so inconsistently on different devices...

@ide ide added the iOS label Dec 19, 2018
@AndrewSouthpaw
Copy link
Contributor Author

AndrewSouthpaw commented Dec 22, 2018

Okay, I finally a decent repro setup. See this Expo Snack.

Repro

Once app is opened, leave it (go to home). Open app back up. As it opens, start pressing the shutter snap button. Generally it's possible to trigger a snap before the camera remounts (or something) and it triggers an error. In order to trigger the error, you need to press it before the camera screen flickers and starts showing a fresh stream of the camera view. Getting it to error this way is a bit tricky and probably harder on faster phones.

The other way to trigger the error is to take a few pictures in rapid succession and then leave the app before the shutter sound fires and the loading indicator goes away. When you return to the screen, the error appears. Similar, it's probably easier to trigger this on a slower phone. I'm using an iPhone 6S (not that slow, but still a lot slower than the latest models).

What did I expect

For case 1, I'd expect it to not be possible to press the snap button until the camera is properly in place, or to have some variable available to us indicating that the camera is ready to take pictures.

For case 2, I'd expect takePictureAsync to not take so long that it's pretty easy to take 3-5 photos and get it to take ~2 seconds before the function finishes, thus making it easy to trigger the error.

Any help or insights people can offer would be very much appreciated.

@AndrewSouthpaw
Copy link
Contributor Author

Any thoughts on this? Do others experience it as well?

@bbarthec
Copy link
Contributor

@AndrewSouthpaw sorry that this issue wasn't handled before! 🙇
Regarding this issue I've created PR that would help with handling one issue you've reported.
Additionally regarding your two cases:

  • 1 - there's camera#onCameraReady callback that is being called when native camera component is ready for handling any request
  • 2 - I couldn't reproduce having taking photo process took more than a couple milliseconds 😞, but I'll give it another shot and try programatically delay taking photo process 😉

@tsapeta tsapeta added this to Backlog in SDK 37 via automation Feb 21, 2020
@tsapeta tsapeta moved this from Backlog to Review in progress in SDK 37 Feb 21, 2020
@bbarthec
Copy link
Contributor

@AndrewSouthpaw I've succeeded in obtaining scenario when camera component starts taking a photo and during this process camera view is unmounted (before taking photo process is completed). This scenario should result in a promise rejection and I've fixed it to do so.

esamelson pushed a commit that referenced this issue Feb 21, 2020
)

# Why

Resolves #3020

Calling [camera#takePictureAsync](https://docs.expo.io/versions/latest/sdk/camera/#takepictureasync) should reject if [camera#onCameraReady](https://docs.expo.io/versions/latest/sdk/camera/#oncameraready) callback wasn't called before (native camera isn't ready yet), while now call is silently lost and promise is neither resolved nor rejected.

# How

Reject from `camera.takePictureAsync` if native camera is not ready yet.

# Test Plan

[snack](https://snack.expo.io/@bbarthec/github---camera---ios---takepictureasync)
@tsapeta tsapeta moved this from Review in progress to Done in SDK 37 Feb 24, 2020
ccheever added a commit that referenced this issue Mar 2, 2020
I made some updates to the guide for using custom fonts.

Changes include:
- Using Snacks for examples
- Using the `useFonts` hook for a simpler example
- Example of loading a remote font
- Discussion of font formats

Squashed commits below

* [android] 🤏 Update react-native-gesture-handler to 1.6.0 (#7121)

# Why

Part of #7006 

# How

- Used `et update-vendored-module` to update `react-native-gesture-handler`.
- Updated versions in some apps.
- Tried to run it on Android... and it turned out there is a new `RNGHModalUtils` file scoped under `com.facebook.react` package so I've copied this file manually to appropriate directory in `expoview`.
- Added a warning saying that `com.facebook.react` needs to be manually updated, we already do the same in `react-native-reanimated`.
- Added changelog entry.

# Test Plan

Tested examples in `native-component-list`.

* [constants] make installationId available in bare (#6906)

* [constants] make available in bare

* make filename constant

* remove installationId from scoped android module

* remove installationId from scoped ios

* fix ios_test_suite

* fix app auth code block (#7138)

* fix app auth code block

* Update app-auth.md

* Update app-auth.md

* [ios][expo-constants] remove duplicate symbol kEXDeviceInstallUUIDKey to fix iOS client build

* Updated linking.md (#7136)

* Updated linking.md

Updated description for WebBrowser to follow latest changes.

* Tidy up docs

Less `const fn = () => `, function keyword is usually better

Co-authored-by: James Ide <ide@users.noreply.github.com>

* [android][home] 🤖 Add DevMenu on Android (#6829)

# Why

Fixes #6521 

# How

- Created unversioned `DevMenuManager` class which mostly just delegates calls to versioned `DevMenuModule` modules specific for SDK version. These modules are responsible for providing initial props, dev menu options and actions to run when these options are selected. The manager creates a new `ReactRootView` that bases on kernel's (home's) React instance manager and starts `HomeMenu` app which is registered as a second entry point in `home` and then, manager adds this root view to the currently used activity (it must implement `ExperienceActivity`). As I needed to know which experience activity is the current one, I've added `sCurrentActivity` static member to that class and just track it using activity's lifecycle methods.
- Backported `DevMenuModule` to all SDK versions included in the client. Including some changes between them - for example hot and fast reloading.
- Added support for back button and Android's menu press (which can be simulated by `adb shell input keyevent 82`).
- Removed some unused code related to `Nux` and replaced it with new onboarding screen (see #6793).
- Created new `ShakeDetector` which works more like on iOS. The one provided by React Native is annoying in most cases as it actually requires two shakes.
- Updated `ReactAndroidCodeTransformer` to turn off showing React Native dev menu in non-standalone apps.
- **To do after merging:** Rebuild versioned expoviews.

# Test Plan

- [x] Test on experience in debug mode
- [x] Test on experience in production mode
- [x] Test on snacks
- [x] Test on older SDKs
- [x] Test on simulators
- [x] Test that onboarding shows up once you open the experience for the first time or you didn't accept it yet (clicked `Got it` button).
- [x] Test that using dev menu still works once we kill home's activity.

* [home] 🏠 Publish new dev home

* [auth-session] Extract AuthSession into unimodule (#6989)

* [expo-auth-session] Extract

* [expo-auth-session] Remove from the expo package

* [expo-auth-session] Add bare support

* [expo-auth-session] Refactor

* [expo-auth-session] Fix CI

* [expo-auth-session] Update CHANGELOG

* [expo-auth-session] Apply requested changes

* [expo-auth-session] Update README

* [expo-auth-session] Update documentation

* [expo-auth-session] apply requested changes

* [auth-session] Fix CI

* run yarn

* [expo-screen-orientation] Update documentation (#6838)

* [expo-screen-orientation] Update docs & add checks to lockPlatfomAsync on iOS

* [expo-screen-orientation] Update installation instruction

* [expo-screen-orientation] Fix quotations marks

* [expo-screen-orientation] Update changelog

* [expo-screen-orientation] Apply requested changes

* [screen-orientation] Apply requested changes

* [screen-orientation] Apply requested changes

* [screen-orientation] Apply requested changes

* [firebase-core] Add core functionality for supporting native Firebase packages (#7013)

* [bare-expo] Fix database-url in GoogleService-Info.plist

* [firebase-core] Add `expo-firebase-core` package

* [firebase-core] Add tests to test-suite

* [firebase-core] Add scoped firebase-core to Expo client to create native sandboxed firebase apps

* [firebase-core] Update bare-expo BasePackageList

* [firebase-core] Add firebase-core to bundledNativeModules.json

* [firebase-core] Add SDK documentation

* [firebase-core] Add firebase-core to Expo client iOS project file

* [firebase-core] Add js build files

* [firebase-core] Update SDK doc to refer to native firebase guide

* [firebase-core] Add web-support & code cleanup

* [docs] Fixes to firebase-core docs

* [firebase-core] Update build files

* [firebase-core] Fix test in test-suite

* [fireabase-core] Cleanup COMPARISON.md

* [firebase-core] Improve google-services.json parsing and client selection

* [firebase-core] Updated SDK docs

* [fireabse-core] Update readme description

* [firebase-core] Removed outcommented line on Android

* [firebase-core] Minor iOS code improvements after review

* [firebase-core] Fixes after review to unit tests

* [firebase-core] Updated iOS code after review feedback

* [firebase-core] Fix tests

* [firebase-core] Simplify JS code

* [firebase-core] Update js build output

* [fireabse-core] Add DEFAULT_WEB_APP_OPTIONS constant + doc improvements

* [firebase-core] Update JS build files

* [firebase-core] Fix unimodulePeerDependencies in package.json

* [firebase-core] Android build.gradle fixes

* [firebase-core] Android base64 encoding code improvement

* [firebase-core] Prevent hard javascript import error when native lib not linked

* [firebase-core] Update various Android methods to be protected i.s.o. public

* [firebase-core] Android protected DEFAULT_APP_NAME and re-use in scoped

* [firebase-core] Update changelog

* [fireabse-core] Update JS build files

* [firebase-android] Fix Firebase App cleanup when multiple projects are loaded on Android

* [ios] Update pods

* [firebase-analytics] Add native Firebase Analytics (#7017)

* [firebase-core] Add tests to test-suite

* [fireabse-analytics] Add expo-firebase-analytics package

* [firebase-core] Add firebase-core to Expo client iOS project file

* [firebase-analytics] Add tests to test-suite

* [bare-expo] Update iOS app-icon assets

* [firebase-analytics] Add expo-firebase-analytics to Expo client

* [bare-expo] Add firebase-analytics to BasePackageList.java

* [firebase-analytics] Add firebase-analytics to bundleNativeModules.json

* [docs] Add firebase-analytics docs

* [firebase-analytics] Update yarn.lock after adding `firebase` (js sdk) dependency

* [firebase-analytics] Add js build output

* [firebase-analytics] Update sdk docs

* [firebase-analytics] Update SDK docs

* [firebase-analytics] Remove firebase JS dep to check CI

* [docs] Update SDK docs & readme for expo-firebase-analytics

* [expo-analytics] Remove firebase peer-dependency

* [firebase-analytics] Add web-support & code cleanup

* [docs] Update firebase-analytics docs

* [firebase-analytics] Update build files

* [firebase-analytics] Fix outdated build files

* [firebase-analytics] Fix lint warnings

* [firebase-analytics] Fixed code-style errors & typos after review

* [firebase-analytics] Moved `unimodulePeerDependencies` to regular peerDependencies in package.json

* [firebase-analytics] Update js build output

* [fireabse-analytics] Update changelog

* [firebse-analytics] Update Android build.gradle

* [ios] Update pods

* [firebase-analytics] Add recording of `screen_view` event when calling `setCurrentScreen`

On web, calling `setCurrentScreen` does not automatically record a screen_view event as
it does on native. We therefore record the 'screen_view' event manually.
https://stackoverflow.com/questions/59330467/how-to-track-page-view-with-firebase-analytics-in-a-web-single-page-app

* [firebase-analytics] Update JS build files

* [firebase-analytics] Remove @unimodules/core peerDependency from package.json

* [docs] Add firebase web-config to app.json docs (#7086)

* [firebase-analytics] Add pure JS analytics for use on Expo Client (#7093)

* [firebase-analytics] WIP js analytics

* [firebase-analytics] Add Pure JS FirebaseAnalytics (wip, 80% done)

* [firebase-analytics] Add pure JS Firebase Analytics (done)

* [firebase-analytics] Update & integrate Pure JS Analytics tracker

* [docs] Add instruction on how to use firebase analytics on Expo Client

* [firebase-analytics] Fixes after review feedback

* [firebase-analytics] Update JS build files

* [firebase-analytics] Update analytics-js to use DEFAULT_WEB_APP_OPTIONS

* [firebase-analytics] Update JS build files

* [firebase-analytics] Add recording of `screen_view` events on Expo client, when calling `setCurrentScreen`

This mimics the behavior on Native, when calling setCurrentScreen also records a screen-view event.

Note that this is different from the Firebase JS SDK, which does not record a screen-view event, and requires `logEvent` to be called manually.

* [firebase-analytics] Update JS build files

* [iOS][notifications] feature: customize notification preview placeholders (#7052)

* [ios] add handling for previewPlaceholder

* fix on android

* update docs

* feedback: mark api availability

* resolve conflict

* Update docs/pages/versions/unversioned/sdk/notifications.md

Co-Authored-By: James Ide <ide@users.noreply.github.com>

* fix typo

* fix ci errors for expo package

Co-authored-by: James Ide <ide@users.noreply.github.com>

* [camera][iOS] Reject from takePictureAsync if camera is not ready (#7144)

# Why

Resolves #3020

Calling [camera#takePictureAsync](https://docs.expo.io/versions/latest/sdk/camera/#takepictureasync) should reject if [camera#onCameraReady](https://docs.expo.io/versions/latest/sdk/camera/#oncameraready) callback wasn't called before (native camera isn't ready yet), while now call is silently lost and promise is neither resolved nor rejected.

# How

Reject from `camera.takePictureAsync` if native camera is not ready yet.

# Test Plan

[snack](https://snack.expo.io/@bbarthec/github---camera---ios---takepictureasync)

* [android][ncl] Update @react-native-community/masked-view to 0.1.6

* [android][ios][ncl] Update @react-native-community/viewpager to 3.3.0

* [android][ios][ncl][bare-expo] Update react-native-reanimated to 1.7.0

* [android][ios][ncl] Update react-native-svg to 11.0.1

* [android][ios][ncl] Updated react-native-webview to 8.1.1

* [expo] Update react-native-view-shot to 3.1.2

* [expotools] fix update-vendored-module for react-native-appearance

* [android][ncl][home] Update react-native-appearance to 0.3.2

* [android][ios][ncl][bare-expo] Update react-native-safe-area-context to 0.7.3

* [ios] fix improperly namespaced import in RNSVGForeignObject

* [bare-expo] reinstall pods

* [android][location] Fixed NPE crash when mTask is made null mid-process. (#7147)

* Remove ANY_HOSTNAME_VERIFIER from Android app-auth debug connection builder (#7152)

* Change constant declaration to static ot aviod duplication of symbols. (#7161)

* [image-picker] Prevent from reloading on OnePlus 7 (#7162)

# Why

Resolves #5804.

# How

Create the output file before open the camera intent.

# Test Plan

- NCL ✅
- #5804 (comment) ✅

* [test-suite] Fix test-suite error on start (#7163)

# Why

Dismissing error screen on every refresh can be daunting after some time (when running in `bare-expo`).

# How

- added `try`-`catch` around calls to missing Facebook Ads module
- added `if (ExpoTaskManager)` around `eventEmitter.addListener`, since event name is fetched as a constant of the module which may be `undefined`
- moved `require(testScreen)` which define tasks to _initialization phase_
- moved `require(cameraScreen)` to global scope since I feel `optionalRequire` only works in global scope (and well, it let me get rid of red screen)

# Test Plan

Running `bare-expo` does not show error screen.

* [image-picker] Remove unused header import (#7168)

# Why

Resolves #7167.

# How

Remove unused import.

# Test Plan

- ios build ✅

* [docs] add permissions methods to api list (#7053)

* add permissions methods to api list

* add requestPermissionsAsync and getPermissionsAsync methods to TOC

* Suggestion in sentry guide (#7157)

* Suggestion in sentry guide

* identical changes to v36.0.0 docs

* [android][task-manager] Task manager for bare in Expo (#6828)

Task manager for bare android and iOS applications.

* [docs] fix app signing page (#7171)

* [docs] fix app signing page

* unversioned

* typo

* [android] remove SDK 33 code re-committed after 38ccf62

* [docs] Update ‘using-firebase’ guide with Analytics section (#7145)

* [docs] Update ‘using-firebase’ guide with Analytics section

* [docs] Add missing `expo-firebase-core` dep to ‘usinig-firebase’ doc

* Update docs/pages/versions/unversioned/guides/using-firebase.md

Co-Authored-By: Brent Vatne <brentvatne@gmail.com>

* [jest-expo-enzyme] publish 1.0.0

* Update expo-module-scripts dependency (#7175)

* [docs] Custom fonts guide update

Work in progress

* [docs] Updating guide to using custom fonts

I made some updates to the guide for using custom fonts.

Changes include:
- Using Snacks for examples
- Using the `useFonts` hook for a simpler example
- Example of loading a remote font
- Discussion of font formats

* Update docs/pages/versions/unversioned/guides/using-custom-fonts.md

Co-Authored-By: Brent Vatne <brentvatne@gmail.com>

* Update docs/pages/versions/unversioned/guides/using-custom-fonts.md

Co-Authored-By: Cedric van Putten <me@bycedric.com>

* Update docs/pages/versions/unversioned/guides/using-custom-fonts.md

Co-Authored-By: Brent Vatne <brentvatne@gmail.com>

Co-authored-by: Tomasz Sapeta <1714764+tsapeta@users.noreply.github.com>
Co-authored-by: Charlie Cruzan <35579283+cruzach@users.noreply.github.com>
Co-authored-by: Evan Bacon <baconbrix@gmail.com>
Co-authored-by: Eric Samelson <esamelson@users.noreply.github.com>
Co-authored-by: Saumya Sharma <saumyasharma010@gmail.com>
Co-authored-by: James Ide <ide@users.noreply.github.com>
Co-authored-by: Łukasz Kosmaty <lukasz.kosmaty@student.uj.edu.pl>
Co-authored-by: Dominik Sokal <dominiksokal@gmail.com>
Co-authored-by: Hein Rutjes <IjzerenHein@users.noreply.github.com>
Co-authored-by: Bartłomiej Bukowski <bartlomiejbukowski.b@gmail.com>
Co-authored-by: briefjudofox <1484049+briefjudofox@users.noreply.github.com>
Co-authored-by: Michał Czernek <czernekmichal@gmail.com>
Co-authored-by: Stanisław Chmiela <sjchmiela@users.noreply.github.com>
Co-authored-by: Ziv Levy <zivl@users.noreply.github.com>
Co-authored-by: Nishant Singh <saysnishant@gmail.com>
Co-authored-by: Brent Vatne <brentvatne@gmail.com>
Co-authored-by: Cedric van Putten <me@bycedric.com>
bbarthec added a commit that referenced this issue Mar 3, 2020
I made some updates to the guide for using custom fonts.

Changes include:
- Using Snacks for examples
- Using the `useFonts` hook for a simpler example
- Example of loading a remote font
- Discussion of font formats

Squashed commits below

* [android] 🤏 Update react-native-gesture-handler to 1.6.0 (#7121)

# Why

Part of #7006 

# How

- Used `et update-vendored-module` to update `react-native-gesture-handler`.
- Updated versions in some apps.
- Tried to run it on Android... and it turned out there is a new `RNGHModalUtils` file scoped under `com.facebook.react` package so I've copied this file manually to appropriate directory in `expoview`.
- Added a warning saying that `com.facebook.react` needs to be manually updated, we already do the same in `react-native-reanimated`.
- Added changelog entry.

# Test Plan

Tested examples in `native-component-list`.

* [constants] make installationId available in bare (#6906)

* [constants] make available in bare

* make filename constant

* remove installationId from scoped android module

* remove installationId from scoped ios

* fix ios_test_suite

* fix app auth code block (#7138)

* fix app auth code block

* Update app-auth.md

* Update app-auth.md

* [ios][expo-constants] remove duplicate symbol kEXDeviceInstallUUIDKey to fix iOS client build

* Updated linking.md (#7136)

* Updated linking.md

Updated description for WebBrowser to follow latest changes.

* Tidy up docs

Less `const fn = () => `, function keyword is usually better

Co-authored-by: James Ide <ide@users.noreply.github.com>

* [android][home] 🤖 Add DevMenu on Android (#6829)

# Why

Fixes #6521 

# How

- Created unversioned `DevMenuManager` class which mostly just delegates calls to versioned `DevMenuModule` modules specific for SDK version. These modules are responsible for providing initial props, dev menu options and actions to run when these options are selected. The manager creates a new `ReactRootView` that bases on kernel's (home's) React instance manager and starts `HomeMenu` app which is registered as a second entry point in `home` and then, manager adds this root view to the currently used activity (it must implement `ExperienceActivity`). As I needed to know which experience activity is the current one, I've added `sCurrentActivity` static member to that class and just track it using activity's lifecycle methods.
- Backported `DevMenuModule` to all SDK versions included in the client. Including some changes between them - for example hot and fast reloading.
- Added support for back button and Android's menu press (which can be simulated by `adb shell input keyevent 82`).
- Removed some unused code related to `Nux` and replaced it with new onboarding screen (see #6793).
- Created new `ShakeDetector` which works more like on iOS. The one provided by React Native is annoying in most cases as it actually requires two shakes.
- Updated `ReactAndroidCodeTransformer` to turn off showing React Native dev menu in non-standalone apps.
- **To do after merging:** Rebuild versioned expoviews.

# Test Plan

- [x] Test on experience in debug mode
- [x] Test on experience in production mode
- [x] Test on snacks
- [x] Test on older SDKs
- [x] Test on simulators
- [x] Test that onboarding shows up once you open the experience for the first time or you didn't accept it yet (clicked `Got it` button).
- [x] Test that using dev menu still works once we kill home's activity.

* [home] 🏠 Publish new dev home

* [auth-session] Extract AuthSession into unimodule (#6989)

* [expo-auth-session] Extract

* [expo-auth-session] Remove from the expo package

* [expo-auth-session] Add bare support

* [expo-auth-session] Refactor

* [expo-auth-session] Fix CI

* [expo-auth-session] Update CHANGELOG

* [expo-auth-session] Apply requested changes

* [expo-auth-session] Update README

* [expo-auth-session] Update documentation

* [expo-auth-session] apply requested changes

* [auth-session] Fix CI

* run yarn

* [expo-screen-orientation] Update documentation (#6838)

* [expo-screen-orientation] Update docs & add checks to lockPlatfomAsync on iOS

* [expo-screen-orientation] Update installation instruction

* [expo-screen-orientation] Fix quotations marks

* [expo-screen-orientation] Update changelog

* [expo-screen-orientation] Apply requested changes

* [screen-orientation] Apply requested changes

* [screen-orientation] Apply requested changes

* [screen-orientation] Apply requested changes

* [firebase-core] Add core functionality for supporting native Firebase packages (#7013)

* [bare-expo] Fix database-url in GoogleService-Info.plist

* [firebase-core] Add `expo-firebase-core` package

* [firebase-core] Add tests to test-suite

* [firebase-core] Add scoped firebase-core to Expo client to create native sandboxed firebase apps

* [firebase-core] Update bare-expo BasePackageList

* [firebase-core] Add firebase-core to bundledNativeModules.json

* [firebase-core] Add SDK documentation

* [firebase-core] Add firebase-core to Expo client iOS project file

* [firebase-core] Add js build files

* [firebase-core] Update SDK doc to refer to native firebase guide

* [firebase-core] Add web-support & code cleanup

* [docs] Fixes to firebase-core docs

* [firebase-core] Update build files

* [firebase-core] Fix test in test-suite

* [fireabase-core] Cleanup COMPARISON.md

* [firebase-core] Improve google-services.json parsing and client selection

* [firebase-core] Updated SDK docs

* [fireabse-core] Update readme description

* [firebase-core] Removed outcommented line on Android

* [firebase-core] Minor iOS code improvements after review

* [firebase-core] Fixes after review to unit tests

* [firebase-core] Updated iOS code after review feedback

* [firebase-core] Fix tests

* [firebase-core] Simplify JS code

* [firebase-core] Update js build output

* [fireabse-core] Add DEFAULT_WEB_APP_OPTIONS constant + doc improvements

* [firebase-core] Update JS build files

* [firebase-core] Fix unimodulePeerDependencies in package.json

* [firebase-core] Android build.gradle fixes

* [firebase-core] Android base64 encoding code improvement

* [firebase-core] Prevent hard javascript import error when native lib not linked

* [firebase-core] Update various Android methods to be protected i.s.o. public

* [firebase-core] Android protected DEFAULT_APP_NAME and re-use in scoped

* [firebase-core] Update changelog

* [fireabse-core] Update JS build files

* [firebase-android] Fix Firebase App cleanup when multiple projects are loaded on Android

* [ios] Update pods

* [firebase-analytics] Add native Firebase Analytics (#7017)

* [firebase-core] Add tests to test-suite

* [fireabse-analytics] Add expo-firebase-analytics package

* [firebase-core] Add firebase-core to Expo client iOS project file

* [firebase-analytics] Add tests to test-suite

* [bare-expo] Update iOS app-icon assets

* [firebase-analytics] Add expo-firebase-analytics to Expo client

* [bare-expo] Add firebase-analytics to BasePackageList.java

* [firebase-analytics] Add firebase-analytics to bundleNativeModules.json

* [docs] Add firebase-analytics docs

* [firebase-analytics] Update yarn.lock after adding `firebase` (js sdk) dependency

* [firebase-analytics] Add js build output

* [firebase-analytics] Update sdk docs

* [firebase-analytics] Update SDK docs

* [firebase-analytics] Remove firebase JS dep to check CI

* [docs] Update SDK docs & readme for expo-firebase-analytics

* [expo-analytics] Remove firebase peer-dependency

* [firebase-analytics] Add web-support & code cleanup

* [docs] Update firebase-analytics docs

* [firebase-analytics] Update build files

* [firebase-analytics] Fix outdated build files

* [firebase-analytics] Fix lint warnings

* [firebase-analytics] Fixed code-style errors & typos after review

* [firebase-analytics] Moved `unimodulePeerDependencies` to regular peerDependencies in package.json

* [firebase-analytics] Update js build output

* [fireabse-analytics] Update changelog

* [firebse-analytics] Update Android build.gradle

* [ios] Update pods

* [firebase-analytics] Add recording of `screen_view` event when calling `setCurrentScreen`

On web, calling `setCurrentScreen` does not automatically record a screen_view event as
it does on native. We therefore record the 'screen_view' event manually.
https://stackoverflow.com/questions/59330467/how-to-track-page-view-with-firebase-analytics-in-a-web-single-page-app

* [firebase-analytics] Update JS build files

* [firebase-analytics] Remove @unimodules/core peerDependency from package.json

* [docs] Add firebase web-config to app.json docs (#7086)

* [firebase-analytics] Add pure JS analytics for use on Expo Client (#7093)

* [firebase-analytics] WIP js analytics

* [firebase-analytics] Add Pure JS FirebaseAnalytics (wip, 80% done)

* [firebase-analytics] Add pure JS Firebase Analytics (done)

* [firebase-analytics] Update & integrate Pure JS Analytics tracker

* [docs] Add instruction on how to use firebase analytics on Expo Client

* [firebase-analytics] Fixes after review feedback

* [firebase-analytics] Update JS build files

* [firebase-analytics] Update analytics-js to use DEFAULT_WEB_APP_OPTIONS

* [firebase-analytics] Update JS build files

* [firebase-analytics] Add recording of `screen_view` events on Expo client, when calling `setCurrentScreen`

This mimics the behavior on Native, when calling setCurrentScreen also records a screen-view event.

Note that this is different from the Firebase JS SDK, which does not record a screen-view event, and requires `logEvent` to be called manually.

* [firebase-analytics] Update JS build files

* [iOS][notifications] feature: customize notification preview placeholders (#7052)

* [ios] add handling for previewPlaceholder

* fix on android

* update docs

* feedback: mark api availability

* resolve conflict

* Update docs/pages/versions/unversioned/sdk/notifications.md

Co-Authored-By: James Ide <ide@users.noreply.github.com>

* fix typo

* fix ci errors for expo package

Co-authored-by: James Ide <ide@users.noreply.github.com>

* [camera][iOS] Reject from takePictureAsync if camera is not ready (#7144)

# Why

Resolves #3020

Calling [camera#takePictureAsync](https://docs.expo.io/versions/latest/sdk/camera/#takepictureasync) should reject if [camera#onCameraReady](https://docs.expo.io/versions/latest/sdk/camera/#oncameraready) callback wasn't called before (native camera isn't ready yet), while now call is silently lost and promise is neither resolved nor rejected.

# How

Reject from `camera.takePictureAsync` if native camera is not ready yet.

# Test Plan

[snack](https://snack.expo.io/@bbarthec/github---camera---ios---takepictureasync)

* [android][ncl] Update @react-native-community/masked-view to 0.1.6

* [android][ios][ncl] Update @react-native-community/viewpager to 3.3.0

* [android][ios][ncl][bare-expo] Update react-native-reanimated to 1.7.0

* [android][ios][ncl] Update react-native-svg to 11.0.1

* [android][ios][ncl] Updated react-native-webview to 8.1.1

* [expo] Update react-native-view-shot to 3.1.2

* [expotools] fix update-vendored-module for react-native-appearance

* [android][ncl][home] Update react-native-appearance to 0.3.2

* [android][ios][ncl][bare-expo] Update react-native-safe-area-context to 0.7.3

* [ios] fix improperly namespaced import in RNSVGForeignObject

* [bare-expo] reinstall pods

* [android][location] Fixed NPE crash when mTask is made null mid-process. (#7147)

* Remove ANY_HOSTNAME_VERIFIER from Android app-auth debug connection builder (#7152)

* Change constant declaration to static ot aviod duplication of symbols. (#7161)

* [image-picker] Prevent from reloading on OnePlus 7 (#7162)

# Why

Resolves #5804.

# How

Create the output file before open the camera intent.

# Test Plan

- NCL ✅
- #5804 (comment) ✅

* [test-suite] Fix test-suite error on start (#7163)

# Why

Dismissing error screen on every refresh can be daunting after some time (when running in `bare-expo`).

# How

- added `try`-`catch` around calls to missing Facebook Ads module
- added `if (ExpoTaskManager)` around `eventEmitter.addListener`, since event name is fetched as a constant of the module which may be `undefined`
- moved `require(testScreen)` which define tasks to _initialization phase_
- moved `require(cameraScreen)` to global scope since I feel `optionalRequire` only works in global scope (and well, it let me get rid of red screen)

# Test Plan

Running `bare-expo` does not show error screen.

* [image-picker] Remove unused header import (#7168)

# Why

Resolves #7167.

# How

Remove unused import.

# Test Plan

- ios build ✅

* [docs] add permissions methods to api list (#7053)

* add permissions methods to api list

* add requestPermissionsAsync and getPermissionsAsync methods to TOC

* Suggestion in sentry guide (#7157)

* Suggestion in sentry guide

* identical changes to v36.0.0 docs

* [android][task-manager] Task manager for bare in Expo (#6828)

Task manager for bare android and iOS applications.

* [docs] fix app signing page (#7171)

* [docs] fix app signing page

* unversioned

* typo

* [android] remove SDK 33 code re-committed after 38ccf62

* [docs] Update ‘using-firebase’ guide with Analytics section (#7145)

* [docs] Update ‘using-firebase’ guide with Analytics section

* [docs] Add missing `expo-firebase-core` dep to ‘usinig-firebase’ doc

* Update docs/pages/versions/unversioned/guides/using-firebase.md

Co-Authored-By: Brent Vatne <brentvatne@gmail.com>

* [jest-expo-enzyme] publish 1.0.0

* Update expo-module-scripts dependency (#7175)

* [docs] Custom fonts guide update

Work in progress

* [docs] Updating guide to using custom fonts

I made some updates to the guide for using custom fonts.

Changes include:
- Using Snacks for examples
- Using the `useFonts` hook for a simpler example
- Example of loading a remote font
- Discussion of font formats

* Update docs/pages/versions/unversioned/guides/using-custom-fonts.md

Co-Authored-By: Brent Vatne <brentvatne@gmail.com>

* Update docs/pages/versions/unversioned/guides/using-custom-fonts.md

Co-Authored-By: Cedric van Putten <me@bycedric.com>

* Update docs/pages/versions/unversioned/guides/using-custom-fonts.md

Co-Authored-By: Brent Vatne <brentvatne@gmail.com>

Co-authored-by: Tomasz Sapeta <1714764+tsapeta@users.noreply.github.com>
Co-authored-by: Charlie Cruzan <35579283+cruzach@users.noreply.github.com>
Co-authored-by: Evan Bacon <baconbrix@gmail.com>
Co-authored-by: Eric Samelson <esamelson@users.noreply.github.com>
Co-authored-by: Saumya Sharma <saumyasharma010@gmail.com>
Co-authored-by: James Ide <ide@users.noreply.github.com>
Co-authored-by: Łukasz Kosmaty <lukasz.kosmaty@student.uj.edu.pl>
Co-authored-by: Dominik Sokal <dominiksokal@gmail.com>
Co-authored-by: Hein Rutjes <IjzerenHein@users.noreply.github.com>
Co-authored-by: Bartłomiej Bukowski <bartlomiejbukowski.b@gmail.com>
Co-authored-by: briefjudofox <1484049+briefjudofox@users.noreply.github.com>
Co-authored-by: Michał Czernek <czernekmichal@gmail.com>
Co-authored-by: Stanisław Chmiela <sjchmiela@users.noreply.github.com>
Co-authored-by: Ziv Levy <zivl@users.noreply.github.com>
Co-authored-by: Nishant Singh <saysnishant@gmail.com>
Co-authored-by: Brent Vatne <brentvatne@gmail.com>
Co-authored-by: Cedric van Putten <me@bycedric.com>
prakashbask pushed a commit to prakashbask/expo that referenced this issue Mar 16, 2022
…po#7144)

# Why

Resolves expo#3020

Calling [camera#takePictureAsync](https://docs.expo.io/versions/latest/sdk/camera/#takepictureasync) should reject if [camera#onCameraReady](https://docs.expo.io/versions/latest/sdk/camera/#oncameraready) callback wasn't called before (native camera isn't ready yet), while now call is silently lost and promise is neither resolved nor rejected.

# How

Reject from `camera.takePictureAsync` if native camera is not ready yet.

# Test Plan

[snack](https://snack.expo.io/@bbarthec/github---camera---ios---takepictureasync)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
No open projects
SDK 37
  
Done
Development

Successfully merging a pull request may close this issue.

4 participants