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

[notifications] Check if icon file exists before removing #13539

Merged
merged 4 commits into from Jul 8, 2021

Conversation

cruzach
Copy link
Contributor

@cruzach cruzach commented Jul 8, 2021

Why

We were removing the icon file even if it didn't exists, causing this error:

Config syncing(node:68723) UnhandledPromiseRejectionWarning: Error: ENOENT: no such file or directory, unlink '/Users/charliecruzan/expotests/easmanaged/android/app/src/main/res/drawable-mdpi/notification_icon.png'
    at Object.unlinkSync (fs.js:1210:3)
    at /Users/charliecruzan/expotests/easmanaged/node_modules/expo-notifications/plugin/build/withNotificationsAndroid.js:135:14
    at Array.forEach (<anonymous>)
    at removeNotificationIconImageFiles (/Users/charliecruzan/expotests/easmanaged/node_modules/expo-notifications/plugin/build/withNotificationsAndroid.js:132:38)
    at setNotificationIconAsync (/Users/charliecruzan/expotests/easmanaged/node_modules/expo-notifications/plugin/build/withNotificationsAndroid.js:88:9)

How

checked for file

Test Plan

added test

Checklist

  • Documentation is up to date to reflect these changes (eg: https://docs.expo.io and README.md).
  • This diff will work correctly for expo build (eg: updated @expo/xdl).
  • This diff will work correctly for expo prebuild & EAS Build (eg: updated a module plugin).

@cruzach cruzach requested a review from brentvatne July 8, 2021 13:48
Copy link
Collaborator

@expo-bot expo-bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The review previously left here is no longer valid, jump to the latest one 👉 #13539 (review)

@expo-bot expo-bot added the bot: suggestions ExpoBot has some suggestions label Jul 8, 2021
Co-authored-by: Expo CI <34669131+expo-ci@users.noreply.github.com>
Copy link
Collaborator

@expo-bot expo-bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi there! 👋 I'm a bot whose goal is to ensure your contributions meet our guidelines.

Looks like I have nothing to complain about 👏 Keep up the good work! 💪

Generated by ExpoBot 🤖 against 74a14bc

@expo-bot expo-bot added bot: passed checks ExpoBot has nothing to complain about and removed bot: suggestions ExpoBot has some suggestions labels Jul 8, 2021
@cruzach cruzach merged commit a3f3a9a into master Jul 8, 2021
@cruzach cruzach deleted the @cruzach/notification-plugin-fix-icon branch July 8, 2021 16:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bot: passed checks ExpoBot has nothing to complain about
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants