React Native Failed to capture snapshot of input files for task 'bundleReleaseJsAndAssets' during up-to-date check

failed to capture fingerprint of input files for task ':app:bundlereleasejsandassets'
gradle failed to capture fingerprint of input files for task
task ':app:packagerelease failed react-native
react-native assemblerelease failed
task :app:bundlereleasejsandassets failed
:app:bundlereleasejsandassets' property '$1' during up-to-date check
app:bundlereleasejsandassets in react-native
task ':app:generatepackagelist failed

I am trying to generate a signed apk file for my react native app (via running ./gradlew assembleRelease), however I am running into the following error:

FAILURE: Build failed with an exception.

* What went wrong:
Failed to capture snapshot of input files for task 'bundleReleaseJsAndAssets' during up-to-date check.
> java.io.FileNotFoundException: /home/mohammad/superexnews/metro-bundler-symbolicate117830-24506-1aaqyox.dr9.sock (No such device or address)

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

BUILD FAILED

Here is it with the stacktrace option:

Incremental java compilation is an incubating feature.
:app:preBuild UP-TO-DATE
:app:preReleaseBuild UP-TO-DATE
:app:checkReleaseManifest
:app:preDebugBuild UP-TO-DATE
:app:prepareComAndroidSupportAppcompatV72301Library UP-TO-DATE
:app:prepareComAndroidSupportSupportV42301Library UP-TO-DATE
:app:prepareComFacebookFbuiTextlayoutbuilderTextlayoutbuilder100Library UP-TO-DATE
:app:prepareComFacebookFrescoDrawee130Library UP-TO-DATE
:app:prepareComFacebookFrescoFbcore130Library UP-TO-DATE
:app:prepareComFacebookFrescoFresco130Library UP-TO-DATE
:app:prepareComFacebookFrescoImagepipeline130Library UP-TO-DATE
:app:prepareComFacebookFrescoImagepipelineBase130Library UP-TO-DATE
:app:prepareComFacebookFrescoImagepipelineOkhttp3130Library UP-TO-DATE
:app:prepareComFacebookReactReactNative0484Library UP-TO-DATE
:app:prepareComFacebookSoloaderSoloader010Library UP-TO-DATE
:app:prepareOrgWebkitAndroidJscR174650Library UP-TO-DATE
:app:prepareReleaseDependencies
:app:compileReleaseAidl UP-TO-DATE
:app:compileReleaseRenderscript UP-TO-DATE
:app:generateReleaseBuildConfig UP-TO-DATE
:app:mergeReleaseShaders UP-TO-DATE
:app:compileReleaseShaders UP-TO-DATE
:app:generateReleaseAssets UP-TO-DATE
:app:mergeReleaseAssets UP-TO-DATE
:app:generateReleaseResValues UP-TO-DATE
:app:generateReleaseResources UP-TO-DATE
:app:mergeReleaseResources UP-TO-DATE
:app:bundleReleaseJsAndAssets

FAILURE: Build failed with an exception.

* What went wrong:
Failed to capture snapshot of input files for task 'bundleReleaseJsAndAssets' during up-to-date check.
> java.io.FileNotFoundException: /home/mohammad/superexnews/metro-bundler-symbolicate117830-24506-1aaqyox.dr9.sock (No such device or address)

* Try:
Run with --info or --debug option to get more log output.

* Exception is:
org.gradle.api.UncheckedIOException: Failed to capture snapshot of input files for task 'bundleReleaseJsAndAssets' during up-to-date check.
        at org.gradle.api.internal.changedetection.rules.AbstractFileSnapshotTaskStateChanges.createSnapshot(AbstractFileSnapshotTaskStateChanges.java:57)
        at org.gradle.api.internal.changedetection.rules.InputFilesTaskStateChanges.getCurrent(InputFilesTaskStateChanges.java:52)
        at org.gradle.api.internal.changedetection.rules.AbstractFileSnapshotTaskStateChanges.getChanges(AbstractFileSnapshotTaskStateChanges.java:42)
        at org.gradle.api.internal.changedetection.rules.AbstractFileSnapshotTaskStateChanges$1.<init>(AbstractFileSnapshotTaskStateChanges.java:71)
        at org.gradle.api.internal.changedetection.rules.AbstractFileSnapshotTaskStateChanges.iterator(AbstractFileSnapshotTaskStateChanges.java:70)
        at org.gradle.api.internal.changedetection.rules.InputFilesTaskStateChanges.iterator(InputFilesTaskStateChanges.java:68)
        at org.gradle.api.internal.changedetection.rules.CachingTaskStateChanges.reset(CachingTaskStateChanges.java:79)
        at org.gradle.api.internal.changedetection.rules.CachingTaskStateChanges.iterator(CachingTaskStateChanges.java:44)
        at org.gradle.api.internal.changedetection.rules.SummaryTaskStateChanges.firstDirtyIterator(SummaryTaskStateChanges.java:63)
        at org.gradle.api.internal.changedetection.rules.SummaryTaskStateChanges.access$000(SummaryTaskStateChanges.java:25)
        at org.gradle.api.internal.changedetection.rules.SummaryTaskStateChanges$1.computeNext(SummaryTaskStateChanges.java:49)
        at org.gradle.api.internal.changedetection.rules.SummaryTaskStateChanges$1.computeNext(SummaryTaskStateChanges.java:42)
        at com.google.common.collect.AbstractIterator.tryToComputeNext(AbstractIterator.java:143)
        at com.google.common.collect.AbstractIterator.hasNext(AbstractIterator.java:138)
        at org.gradle.api.internal.changedetection.changes.DefaultTaskArtifactStateRepository$TaskArtifactStateImpl.collectChangedMessages(DefaultTaskArtifactStateRepository.java:83)
        at org.gradle.api.internal.changedetection.changes.DefaultTaskArtifactStateRepository$TaskArtifactStateImpl.isUpToDate(DefaultTaskArtifactStateRepository.java:74)
        at org.gradle.api.internal.tasks.execution.SkipUpToDateTaskExecuter.execute(SkipUpToDateTaskExecuter.java:53)
        at org.gradle.api.internal.tasks.execution.ValidatingTaskExecuter.execute(ValidatingTaskExecuter.java:58)
        at org.gradle.api.internal.tasks.execution.SkipEmptySourceFilesTaskExecuter.execute(SkipEmptySourceFilesTaskExecuter.java:52)
        at org.gradle.api.internal.tasks.execution.SkipTaskWithNoActionsExecuter.execute(SkipTaskWithNoActionsExecuter.java:52)
        at org.gradle.api.internal.tasks.execution.SkipOnlyIfTaskExecuter.execute(SkipOnlyIfTaskExecuter.java:53)
        at org.gradle.api.internal.tasks.execution.ExecuteAtMostOnceTaskExecuter.execute(ExecuteAtMostOnceTaskExecuter.java:43)
        at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter$EventFiringTaskWorker.execute(DefaultTaskGraphExecuter.java:203)
        at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter$EventFiringTaskWorker.execute(DefaultTaskGraphExecuter.java:185)
        at org.gradle.execution.taskgraph.AbstractTaskPlanExecutor$TaskExecutorWorker.processTask(AbstractTaskPlanExecutor.java:66)
        at org.gradle.execution.taskgraph.AbstractTaskPlanExecutor$TaskExecutorWorker.run(AbstractTaskPlanExecutor.java:50)
        at org.gradle.execution.taskgraph.DefaultTaskPlanExecutor.process(DefaultTaskPlanExecutor.java:25)
        at org.gradle.execution.taskgraph.DefaultTaskGraphExecuter.execute(DefaultTaskGraphExecuter.java:110)
        at org.gradle.execution.SelectedTaskExecutionAction.execute(SelectedTaskExecutionAction.java:37)
        at org.gradle.execution.DefaultBuildExecuter.execute(DefaultBuildExecuter.java:37)
        at org.gradle.execution.DefaultBuildExecuter.access$000(DefaultBuildExecuter.java:23)
        at org.gradle.execution.DefaultBuildExecuter$1.proceed(DefaultBuildExecuter.java:43)
        at org.gradle.execution.DryRunBuildExecutionAction.execute(DryRunBuildExecutionAction.java:32)
        at org.gradle.execution.DefaultBuildExecuter.execute(DefaultBuildExecuter.java:37)
        at org.gradle.execution.DefaultBuildExecuter.execute(DefaultBuildExecuter.java:30)
        at org.gradle.initialization.DefaultGradleLauncher$4.run(DefaultGradleLauncher.java:153)
        at org.gradle.internal.Factories$1.create(Factories.java:22)
        at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:91)
        at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:53)
        at org.gradle.initialization.DefaultGradleLauncher.doBuildStages(DefaultGradleLauncher.java:150)
        at org.gradle.initialization.DefaultGradleLauncher.access$200(DefaultGradleLauncher.java:32)
        at org.gradle.initialization.DefaultGradleLauncher$1.create(DefaultGradleLauncher.java:98)
        at org.gradle.initialization.DefaultGradleLauncher$1.create(DefaultGradleLauncher.java:92)
        at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:91)
        at org.gradle.internal.progress.DefaultBuildOperationExecutor.run(DefaultBuildOperationExecutor.java:63)
        at org.gradle.initialization.DefaultGradleLauncher.doBuild(DefaultGradleLauncher.java:92)
        at org.gradle.initialization.DefaultGradleLauncher.run(DefaultGradleLauncher.java:83)
        at org.gradle.launcher.exec.InProcessBuildActionExecuter$DefaultBuildController.run(InProcessBuildActionExecuter.java:99)
        at org.gradle.tooling.internal.provider.ExecuteBuildActionRunner.run(ExecuteBuildActionRunner.java:28)
        at org.gradle.launcher.exec.ChainingBuildActionRunner.run(ChainingBuildActionRunner.java:35)
        at org.gradle.launcher.exec.InProcessBuildActionExecuter.execute(InProcessBuildActionExecuter.java:48)
        at org.gradle.launcher.exec.InProcessBuildActionExecuter.execute(InProcessBuildActionExecuter.java:30)
        at org.gradle.launcher.exec.ContinuousBuildActionExecuter.execute(ContinuousBuildActionExecuter.java:81)
        at org.gradle.launcher.exec.ContinuousBuildActionExecuter.execute(ContinuousBuildActionExecuter.java:46)
        at org.gradle.launcher.exec.DaemonUsageSuggestingBuildActionExecuter.execute(DaemonUsageSuggestingBuildActionExecuter.java:51)
        at org.gradle.launcher.exec.DaemonUsageSuggestingBuildActionExecuter.execute(DaemonUsageSuggestingBuildActionExecuter.java:28)
        at org.gradle.launcher.cli.RunBuildAction.run(RunBuildAction.java:43)
        at org.gradle.internal.Actions$RunnableActionAdapter.execute(Actions.java:173)
        at org.gradle.launcher.cli.CommandLineActionFactory$ParseAndBuildAction.execute(CommandLineActionFactory.java:239)
        at org.gradle.launcher.cli.CommandLineActionFactory$ParseAndBuildAction.execute(CommandLineActionFactory.java:212)
        at org.gradle.launcher.cli.JavaRuntimeValidationAction.execute(JavaRuntimeValidationAction.java:35)
        at org.gradle.launcher.cli.JavaRuntimeValidationAction.execute(JavaRuntimeValidationAction.java:24)
        at org.gradle.launcher.cli.ExceptionReportingAction.execute(ExceptionReportingAction.java:33)
        at org.gradle.launcher.cli.ExceptionReportingAction.execute(ExceptionReportingAction.java:22)
        at org.gradle.launcher.cli.CommandLineActionFactory$WithLogging.execute(CommandLineActionFactory.java:205)
        at org.gradle.launcher.cli.CommandLineActionFactory$WithLogging.execute(CommandLineActionFactory.java:169)
        at org.gradle.launcher.Main.doAction(Main.java:33)
        at org.gradle.launcher.bootstrap.EntryPoint.run(EntryPoint.java:45)
        at org.gradle.launcher.bootstrap.ProcessBootstrap.runNoExit(ProcessBootstrap.java:55)
        at org.gradle.launcher.bootstrap.ProcessBootstrap.run(ProcessBootstrap.java:36)
        at org.gradle.launcher.GradleMain.main(GradleMain.java:23)
        at org.gradle.wrapper.BootstrapMainStarter.start(BootstrapMainStarter.java:30)
        at org.gradle.wrapper.WrapperExecutor.execute(WrapperExecutor.java:127)
        at org.gradle.wrapper.GradleWrapperMain.main(GradleWrapperMain.java:61)
Caused by: org.gradle.api.UncheckedIOException: java.io.FileNotFoundException: /home/mohammad/superexnews/metro-bundler-symbolicate117830-24506-1aaqyox.dr9.sock (No such device or address)
        at org.gradle.internal.hash.HashUtil.createHash(HashUtil.java:39)
        at org.gradle.api.internal.hash.DefaultHasher.hash(DefaultHasher.java:25)
        at org.gradle.api.internal.changedetection.state.CachingFileSnapshotter.snapshot(CachingFileSnapshotter.java:82)
        at org.gradle.api.internal.changedetection.state.CachingFileSnapshotter.snapshot(CachingFileSnapshotter.java:71)
        at org.gradle.api.internal.changedetection.state.CachingFileSnapshotter.snapshot(CachingFileSnapshotter.java:34)
        at org.gradle.api.internal.changedetection.state.DefaultVisitedTree$1.transform(DefaultVisitedTree.java:112)
        at org.gradle.api.internal.changedetection.state.DefaultVisitedTree$1.transform(DefaultVisitedTree.java:104)
        at org.gradle.util.CollectionUtils.collect(CollectionUtils.java:188)
        at org.gradle.util.CollectionUtils.collect(CollectionUtils.java:183)
        at org.gradle.api.internal.changedetection.state.DefaultVisitedTree.createTreeSnapshot(DefaultVisitedTree.java:104)
        at org.gradle.api.internal.changedetection.state.DefaultVisitedTree.maybeCreateSnapshot(DefaultVisitedTree.java:97)
        at org.gradle.api.internal.changedetection.state.AbstractFileCollectionSnapshotter$1.run(AbstractFileCollectionSnapshotter.java:71)
        at org.gradle.internal.Factories$1.create(Factories.java:22)
        at org.gradle.cache.internal.DefaultCacheAccess.useCache(DefaultCacheAccess.java:192)
        at org.gradle.cache.internal.DefaultCacheAccess.useCache(DefaultCacheAccess.java:175)
        at org.gradle.cache.internal.DefaultPersistentDirectoryStore.useCache(DefaultPersistentDirectoryStore.java:106)
        at org.gradle.cache.internal.DefaultCacheFactory$ReferenceTrackingCache.useCache(DefaultCacheFactory.java:187)
        at org.gradle.api.internal.changedetection.state.DefaultTaskArtifactStateCacheAccess.useCache(DefaultTaskArtifactStateCacheAccess.java:60)
        at org.gradle.api.internal.changedetection.state.AbstractFileCollectionSnapshotter.snapshot(AbstractFileCollectionSnapshotter.java:59)
        at org.gradle.api.internal.changedetection.state.DefaultFileCollectionSnapshotter.snapshot(DefaultFileCollectionSnapshotter.java:30)
        at org.gradle.api.internal.changedetection.rules.AbstractFileSnapshotTaskStateChanges.createSnapshot(AbstractFileSnapshotTaskStateChanges.java:55)
        ... 73 more
Caused by: java.io.FileNotFoundException: /home/mohammad/superexnews/metro-bundler-symbolicate117830-24506-1aaqyox.dr9.sock (No such device or address)
        at org.gradle.internal.hash.HashUtil.createHash(HashUtil.java:34)
        ... 93 more


BUILD FAILED

Total time: 8.509 secs

I'm not sure how to fix this, so can anyone tell me what is going wrong/ how to fix this?

Let me know if you need more information as well

Fixed it by removing node_modules folder and re-running npm install command.

Failed to capture snapshot of input files for task ':app , After doing npm install react-native-linear-gradient --save, if i link automatically using (react-native link react-native-linear-gradient) or manually. I won't be able  Failed to capture snapshot of input files for task ':react-native-camera:compileDebugAidl' property 'importDirs' during up-to-date check. The library com.google.android.gms:play-services-basement is being requested by various other libraries at [[15.0.1,15.0.1]], but resolves to 12.0.1.

I was also suffering through this error. What I found that in App > android folder there is a file which name is "metro-bundler-symbolicate117830-24506-1aaqyox.dr9.sock". I delete this file and run

  ./gradlew assembleRelease 

and it run successfully.

Failed to capture snapshot of input files for task ':react-native-device , Current behavior. org.gradle.api.UncheckedIOException: Failed to capture snapshot of input files for task ':react-native-device-info:compileDebugAidl' property  Dismiss Join GitHub today. GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.

I once had this error. What I did was clean gradle, re-install npm and that was it. See steps below:

cd android
gradlew clean
npm install
react-native run-android

Failed to capture fingerprint of output files for task ':app , I'm running react-native run-android and it keeps failing during the build. I'm using the latest version of android studio and I believe everything  Returns a Promise of the image URI. view is a reference to a React Native component. options may include: width / height (number): the width and height of the final image (resized from the View bound. don't provide it if you want the original pixel size). format (string): either png or jpg or webm (Android).

Run this command if you are on Linux.

sudo rm -R metro-symbolicate118829-8699-1t3awul.3lw9.sock

Or just delete all metro related files, some files cannot be deleted so you need to delete it as an Admin.

React Native Failed to capture snapshot of input files for task, Task :react-native-navigation:processReactNative57_5DebugJavaRes NO-​SOURCE Failed to capture fingerprint of input files for task ':app:​preDebugBuild'  It is expected that all snapshots are part of the code that is run on CI and since new snapshots automatically pass, they should not pass a test run on a CI system. It is recommended to always commit all snapshots and to keep them in version control. What to do when a snap test fails?

Had the same issue so i just cleaned the clean the gradle cd android gradlew clean and it worked like a charm.

Can't comment cause of low reputation so please no negative voting :)

Failed to capture snapshot of input files for task ':app , Fixed it by removing node_modules folder and re-running npm install command. @budiga To be honest with you i'm far from an expert in React Native, but after a quick search on stackoverflow it seems like your problem is not from react native but from a png file. Maybe you can search in that direction or try using another image to see if that works to help you locate the issue. Hope this help :)

Build failure with Failed to capture snapshot of input files for task 'war', react-native-linear-gradient) or manually. I won't be able to build again with error message: * What went wrong: Failed to capture snapshot of input files for task  @AAKIBZ but it will work for one time next time you have to do same things instead of this you can also do gradlew cleanBuildCache.I did back track on buildToolsVersion it was working but after some time again facing the same issue not getting exactly what happening one more thing after creating built the project is not working in actual device If any one have better solution please provide .

React Native - Build Android APK bundle, I'm new to gradle and inherited a build. I'm building the code through jenkins CI and invoking gradle 2.3. The tasks I'm calling are "clean war". Solution of Execution failed for task processDebugResources Android Error in React Native: 1. Open your react native project folder in CMD(Command Prompt) and execute the below command. This command would clean the previously build Gradlew files and refresh the complete react native android project.

Failed to capture snapshot of input files for task ':app - android, Failed to capture snapshot of input files for task 'bundleReleaseJsAndAssets' during up-to-date check. java.io.FileNotFoundException:  08 June, 2017 / React Native, Android React Native - Build Android APK bundle. This guide is for React Native 0.42.. When working on an app with many static images, I found out that those images were displayed correctly on the emulator, but were blank when testing on a real device.

Comments
  • Did you follow all the steps showing here before bundling your app?