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

UIExplorer example fails to build (again) #6107

Closed
edward-at-intelex opened this issue Feb 23, 2016 · 7 comments
Closed

UIExplorer example fails to build (again) #6107

edward-at-intelex opened this issue Feb 23, 2016 · 7 comments
Labels
Resolution: Locked This issue was locked by the bot.

Comments

@edward-at-intelex
Copy link

Hello,

  • I was following the instructions to set up the react-native examples (UIExplorer, Movies etc.) pulled from GIT.
  • I am attempting to set it up to preview the examples via the Genymotion Android Simulator on a Mac.
    *All previous steps regarding setup, pulling the repo, etc. are successful with no errors.
    *I then execute the following statement at the bash shell on Mac

./gradlew :Examples:UIExplorer:android:app:installDebug

The following error is shown while building.

_:Examples:UIExplorer:android:app:compileDebugJavaWithJavac
/Users/edward/gitRepo/react-native/Examples/UIExplorer/android/app/src/main/java/UIExplorerActivity.java:63: error: cannot find symbol
mReactInstanceManager.onPause();
^
symbol: method onPause()
location: variable mReactInstanceManager of type ReactInstanceManager
/Users/edward/gitRepo/react-native/Examples/UIExplorer/android/app/src/main/java/UIExplorerActivity.java:72: error: cannot find symbol
mReactInstanceManager.onResume(this, this);
^
symbol: method onResume(UIExplorerActivity,UIExplorerActivity)
location: variable mReactInstanceManager of type ReactInstanceManager
2 errors
:Examples:UIExplorer:android:app:compileDebugJavaWithJavac FAILED

FAILURE: Build failed with an exception.

  • What went wrong:
    Execution failed for task ':Examples:UIExplorer:android:app:compileDebugJavaWithJavac'.

    Compilation failed; see the compiler error output for details.

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

BUILD FAILED_

Using the --debug parameter reveals similar info

11:47:06.178 [INFO] [org.gradle.api.internal.tasks.compile.JdkJavaCompiler] Compiling with JDK Java compiler API.
11:47:06.434 [ERROR] [system.err] /Users/edward/gitRepo/react-native/Examples/UIExplorer/android/app/src/main/java/UIExplorerActivity.java:63: error: cannot find symbol
11:47:06.434 [ERROR] [system.err] mReactInstanceManager.onPause();
11:47:06.434 [ERROR] [system.err] ^
11:47:06.435 [ERROR] [system.err] symbol: method onPause()
11:47:06.435 [ERROR] [system.err] location: variable mReactInstanceManager of type ReactInstanceManager
11:47:06.440 [ERROR] [system.err] /Users/edward/gitRepo/react-native/Examples/UIExplorer/android/app/src/main/java/UIExplorerActivity.java:72: error: cannot find symbol
11:47:06.441 [ERROR] [system.err] mReactInstanceManager.onResume(this, this);
11:47:06.441 [ERROR] [system.err] ^
11:47:06.441 [ERROR] [system.err] symbol: method onResume(UIExplorerActivity,UIExplorerActivity)
11:47:06.441 [ERROR] [system.err] location: variable mReactInstanceManager of type ReactInstanceManager
11:47:06.464 [ERROR] [system.err] 2 errors
11:47:06.465 [DEBUG] [org.gradle.api.internal.tasks.execution.ExecuteAtMostOnceTaskExecuter] Finished executing task ':Examples:UIExplorer:android:app:compileDebugJavaWithJavac'
11:47:06.465 [LIFECYCLE] [class org.gradle.TaskExecutionLogger] :Examples:UIExplorer:android:app:compileDebugJavaWithJavac FAILED
11:47:06.466 [INFO] [org.gradle.execution.taskgraph.AbstractTaskPlanExecutor] :Examples:UIExplorer:android:app:compileDebugJavaWithJavac (Thread[Daemon worker Thread 4,5,main]) completed. Took 0.319 secs.
11:47:06.466 [DEBUG] [org.gradle.execution.taskgraph.AbstractTaskPlanExecutor] Task worker [Thread[Daemon worker Thread 4,5,main]] finished, busy: 5.546 secs, idle: 0.049 secs
11:47:06.468 [ERROR] [org.gradle.BuildExceptionReporter]
11:47:06.468 [ERROR] [org.gradle.BuildExceptionReporter] FAILURE: Build failed with an exception.
11:47:06.468 [ERROR] [org.gradle.BuildExceptionReporter]
11:47:06.469 [ERROR] [org.gradle.BuildExceptionReporter] * What went wrong:
11:47:06.469 [ERROR] [org.gradle.BuildExceptionReporter] Execution failed for task ':Examples:UIExplorer:android:app:compileDebugJavaWithJavac'.
11:47:06.469 [ERROR] [org.gradle.BuildExceptionReporter] > Compilation failed; see the compiler error output for details.
11:47:06.469 [ERROR] [org.gradle.BuildExceptionReporter]
11:47:06.469 [ERROR] [org.gradle.BuildExceptionReporter] * Try:
11:47:06.470 [ERROR] [org.gradle.BuildExceptionReporter] Run with --stacktrace option to get the stack trace.
11:47:06.471 [LIFECYCLE] [org.gradle.BuildResultLogger]
11:47:06.471 [LIFECYCLE] [org.gradle.BuildResultLogger] BUILD FAILED
11:47:06.471 [LIFECYCLE] [org.gradle.BuildResultLogger]
11:47:06.471 [LIFECYCLE] [org.gradle.BuildResultLogger] Total time: 14.184 secs

11:47:07.413 [INFO] [org.gradle.launcher.daemon.client.DaemonClient] Received result Failure[value=org.gradle.initialization.ReportedException: org.gradle.internal.exceptions.LocationAwareException: Execution failed for task ':Examples:UIExplorer:android:app:compileDebugJavaWithJavac'.] from daemon DaemonInfo{pid=23827, address=[0c64a320-a8e2-43e3-ad0a-0b3dfff7feca port:65276, addresses:[/0:0:0:0:0:0:0:1, /127.0.0.1]], idle=true, context=DefaultDaemonContext[uid=dba435c0-a637-4e5b-8486-166f81a1489c,javaHome=/Library/Java/JavaVirtualMachines/jdk1.8.0_66.jdk/Contents/Home,daemonRegistryDir=/Users/edward/.gradle/daemon,pid=23827,idleTimeout=10800000,daemonOpts=-XX:MaxPermSize=256m,-XX:+HeapDumpOnOutOfMemoryError,-Xmx1024m,-Dfile.encoding=UTF-8,-Duser.country=US,-Duser.language=en,-Duser.variant]} (build should be done).

and using the -info parameter also returns the same information

Executing task ':Examples:UIExplorer:android:app:compileDebugJavaWithJavac' (up-to-date check took 0.004 secs) due to:
No history is available.
All input files are considered out-of-date for incremental task ':Examples:UIExplorer:android:app:compileDebugJavaWithJavac'.
Compiling with JDK Java compiler API.
/Users/edward/gitRepo/react-native/Examples/UIExplorer/android/app/src/main/java/UIExplorerActivity.java:63: error: cannot find symbol
mReactInstanceManager.onPause();
^
symbol: method onPause()
location: variable mReactInstanceManager of type ReactInstanceManager
/Users/edward/gitRepo/react-native/Examples/UIExplorer/android/app/src/main/java/UIExplorerActivity.java:72: error: cannot find symbol
mReactInstanceManager.onResume(this, this);
^
symbol: method onResume(UIExplorerActivity,UIExplorerActivity)
location: variable mReactInstanceManager of type ReactInstanceManager
2 errors
:Examples:UIExplorer:android:app:compileDebugJavaWithJavac FAILED
:Examples:UIExplorer:android:app:compileDebugJavaWithJavac (Thread[Daemon worker Thread 5,5,main]) completed. Took 0.418 secs.

FAILURE: Build failed with an exception.

  • What went wrong:
    Execution failed for task ':Examples:UIExplorer:android:app:compileDebugJavaWithJavac'.

    Compilation failed; see the compiler error output for details.

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

BUILD FAILED

Total time: 7.151 secs
Stopped 0 compiler daemon(s).
Received result Failure[value=org.gradle.initialization.ReportedException: org.gradle.internal.exceptions.LocationAwareException: Execution failed for task ':Examples:UIExplorer:android:app:compileDebugJavaWithJavac'.] from daemon DaemonInfo{pid=23827, address=[0c64a320-a8e2-43e3-ad0a-0b3dfff7feca port:65276, addresses:[/0:0:0:0:0:0:0:1, /127.0.0.1]], idle=true, context=DefaultDaemonContext[uid=dba435c0-a637-4e5b-8486-166f81a1489c,javaHome=/Library/Java/JavaVirtualMachines/jdk1.8.0_66.jdk/Contents/Home,daemonRegistryDir=/Users/edward/.gradle/daemon,pid=23827,idleTimeout=10800000,daemonOpts=-XX:MaxPermSize=256m,-XX:+HeapDumpOnOutOfMemoryError,-Xmx1024m,-Dfile.encoding=UTF-8,-Duser.country=US,-Duser.language=en,-Duser.variant]} (build should be done).

using --stacktrace returns

org.gradle.api.tasks.TaskExecutionException: Execution failed for task ':Examples:UIExplorer:android:app:compileDebugJavaWithJavac'.
at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:69)
at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.execute(ExecuteActionsTaskExecuter.java:46)

... (did not want to put the whole stacktrace unless you want it)

All the types of errors indicate that UIExplorerActivity.java has an error onPause() and onResume() while compiling.

I have already looked at similar issues on this list, including

But they do not appear to be related to this issue (as it is a different class that is failing even though the error result might be the same.

Notes: building the iOS version works fine (with xCode etc.).

How to fix this? Any insight appreciated. thanks..

Edward

@janicduplessis
Copy link
Contributor

Are you sure you have the latest version? I fixed this a few days ago in ad17a2f.

@edward-at-intelex
Copy link
Author

Hi @janicduplessis I pulled last week, February 19th it looks like. Did you update it since then? Would you suggest I pull again and go through the steps?

@janicduplessis
Copy link
Contributor

Yes, it was fixed 2 days ago. You can just pull again and it should work.

@edward-at-intelex
Copy link
Author

Hello @janicduplessis ,

Thanks for your response. I pulled the latest build from gitHub (via git pull). I was able to proceed with invoking the following lines

./gradlew :Examples:UIExplorer:android:app:installDebug
./packager/packager.sh

note I replaced Movies with UIExplorer, of course.

but when launching the app in the genymotion simulator I get the following error in the sim:

playerscreensnapz001

and the terminal log shows the following information below.

TypeError: _this2._depGraph.createPolyfill is not a function
at index.js:152:40
at Array.map (native)
at Resolver.getModuleSystemDependencies (index.js:152:7)
at Bundler.bundle (index.js:163:22)
at index.js:223:28
at tryCallOne (/Users/edward/gitRepo/react-native/node_modules/promise/lib/core.js:37:12)
at /Users/edward/gitRepo/react-native/node_modules/promise/lib/core.js:123:15
at flush (/Users/edward/gitRepo/react-native/node_modules/promise/node_modules/asap/raw.js:50:29)
at nextTickCallbackWith0Args (node.js:453:9)
at process._tickCallback (node.js:382:13)

doing a search for createPolyfill here in the issues threads doesn't reveal anything. Let me know how to proceed from here.

thanks

Edward

@edward-at-intelex
Copy link
Author

Hi there - in addition, I did check index.js as well, and it does seem that createPolyfill() is not actually defined there...I looked up the declaration of _depGraph and this is what I see initially:

`
this._depGraph = new DependencyGraph({

  activity: Activity,

  roots: opts.projectRoots,

  assetRoots_DEPRECATED: opts.assetRoots,

  assetExts: opts.assetExts,

  ignoreFilePath: function(filepath) {

    return filepath.indexOf('__tests__') !== -1 ||

      (opts.blacklistRE && opts.blacklistRE.test(filepath));

  },

  providesModuleNodeModules: [

    'fbjs',

    'react',

    'react-native',

    // Parse requires AsyncStorage. They will
    // change that to require('react-native') which
    // should work after this release and we can
    // remove it from here.

    'parse',

  ],

  platforms: ['ios', 'android'],

  preferNativePlatform: true,

  fileWatcher: opts.fileWatcher,

  cache: opts.cache,

  shouldThrowOnUnresolvedErrors: (_, platform) => platform === 'ios',


});`

not sure if that helps, but let me know if you need other info - or maybe this should be pushed to a new thread/discussion (as its not related to building the examples)

@Kureev
Copy link
Contributor

Kureev commented Feb 24, 2016

Hi @edward-at-intelex,

Updating your node-haste module to 2.3.0 will solve the problem (see b41ad9f).

@edward-at-intelex
Copy link
Author

@Kureev thank you, I have updated node-haste. it appears to be working now. someone should update notes at some point :)

have a great day.

@facebook facebook locked as resolved and limited conversation to collaborators May 24, 2018
@react-native-bot react-native-bot added the Resolution: Locked This issue was locked by the bot. label Jul 20, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Resolution: Locked This issue was locked by the bot.
Projects
None yet
Development

No branches or pull requests

5 participants