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

[Android] TypeError: expected dynamic type 'string', but had type 'int64' #2983

Closed
BerndWessels opened this issue Sep 23, 2015 · 11 comments
Closed
Labels
Resolution: Locked This issue was locked by the bot.

Comments

@BerndWessels
Copy link
Contributor

Hello

I just cloned the latest master (UTC/GMT is 20:00 on 23 September 2015) and I get the red screen of death saying:

TypeError: expected dynamic type 'string', but had type 'int64'

That is with the default project created with react-native init freedom and react-native run-android.

I also get this console output from react-native start

Unable to resolve module image!myIcon from Y:\fraedom\node_modules\react-native\Libraries\Image\Image.android.js
Unable to resolve module image!app_logo from Y:\fraedom\node_modules\react-native\Libraries\Components\ToolbarAndroid\ToolbarAndroid.android.js
Unable to resolve module image!icon_settings from Y:\fraedom\node_modules\react-native\Libraries\Components\ToolbarAndroid\ToolbarAndroid.android.js
Unable to resolve module image!some_icon from Y:\fraedom\node_modules\react-native\Libraries\Components\ToolbarAndroid\ToolbarAndroid.android.js
Unable to resolve module image!myButton from Y:\fraedom\node_modules\react-native\Libraries\Components\Touchable\TouchableHighlight.js
Unable to resolve module image!myButton from Y:\fraedom\node_modules\react-native\Libraries\Components\Touchable\TouchableOpacity.js

Any ideas how to fix that?

Here is the complete output from react-native start:

Y:\fraedom>react-native start

 ┌────────────────────────────────────────────────────────────────────────────┐
 │  Running packager on port 8081.                                            │
 │                                                                            │
 │  Keep this packager running while developing on any JS projects. Feel      │
 │  free to close this tab and run your own packager instance if you          │
 │  prefer.                                                                   │
 │                                                                            │
 │  https://github.com/facebook/react-native                                  │
 │                                                                            │
 └────────────────────────────────────────────────────────────────────────────┘
Looking for JS files in
   Y:\fraedom

[8:55:21 AM] <START> Building Dependency Graph
[8:55:21 AM] <START> Crawling File System
[8:55:21 AM] <START> Loading bundles layout
[8:55:21 AM] <END>   Loading bundles layout (0ms)

React packager ready.

[8:55:31 AM] <END>   Crawling File System (9938ms)
[8:55:31 AM] <START> Building in-memory fs for JavaScript
[8:55:32 AM] <END>   Building in-memory fs for JavaScript (1265ms)
[8:55:32 AM] <START> Building in-memory fs for Assets
[8:55:33 AM] <END>   Building in-memory fs for Assets (1037ms)
[8:55:33 AM] <START> Building Haste Map
[8:55:34 AM] <START> Building (deprecated) Asset Map
[8:55:34 AM] <END>   Building (deprecated) Asset Map (166ms)
[8:55:34 AM] <END>   Building Haste Map (883ms)
[8:55:34 AM] <END>   Building Dependency Graph (13130ms)
[8:55:44 AM] <START> request:/index.android.bundle?platform=android
[8:55:44 AM] <START> find dependencies
Unable to resolve module image!myIcon from Y:\fraedom\node_modules\react-native\Libraries\Image\Image.android.js
Unable to resolve module image!app_logo from Y:\fraedom\node_modules\react-native\Libraries\Components\ToolbarAndroid\ToolbarAndroid.android.js
Unable to resolve module image!icon_settings from Y:\fraedom\node_modules\react-native\Libraries\Components\ToolbarAndroid\ToolbarAndroid.android.js
Unable to resolve module image!some_icon from Y:\fraedom\node_modules\react-native\Libraries\Components\ToolbarAndroid\ToolbarAndroid.android.js
Unable to resolve module image!myButton from Y:\fraedom\node_modules\react-native\Libraries\Components\Touchable\TouchableHighlight.js
Unable to resolve module image!myButton from Y:\fraedom\node_modules\react-native\Libraries\Components\Touchable\TouchableOpacity.js
[8:55:45 AM] <END>   find dependencies (145ms)
[8:55:45 AM] <START> transform
transforming [========================================] 100% 314/314
[8:55:45 AM] <END>   transform (89ms)
[8:55:45 AM] <END>   request:/index.android.bundle?platform=android (256ms)
::ffff:127.0.0.1 - - [Wed, 23 Sep 2015 20:55:46 GMT] "GET /flow/ HTTP/1.1" 404 - "-" "okhttp/2.4.0"

rn1

@mkonicek
Copy link
Contributor

Talked to @andreicoman11, this was fixed on master and will be fixed in 0.12. Let's reopen if we see it again.

@mkonicek
Copy link
Contributor

Reopening, just got a repro.

@mkonicek
Copy link
Contributor

My bad, I was just running old Java code, doesn't happen on master. Will be sending out a 0.12-rc so you'll be able to test that.

@BerndWessels
Copy link
Contributor Author

Hi @mkonicek @ide and @andreicoman11

Sorry, but I think this is not fixed yet.

I cleaned out my system, the npm cache and everything else.

Then I cloned the latest master from an hour ago.

I created a project with react-native init

    Y:\>react-native init hope
    This will walk you through creating a new React Native project in Y:\hope
    Installing react-native package from npm...
    Setting up new React Native app in Y:\hope
       create .flowconfig
       create .gitignore
       create .watchmanconfig
       create index.ios.js
       create index.android.js
       create ios\main.jsbundle
       create ios\hope\AppDelegate.h
       create ios\hope\AppDelegate.m
       create ios\hope\Base.lproj\LaunchScreen.xib
       create ios\hope\Images.xcassets\AppIcon.appiconset\Contents.json
       create ios\hope\Info.plist
       create ios\hope\main.m
       create ios\hopeTests\hopeTests.m
       create ios\hopeTests\Info.plist
       create ios\hope.xcodeproj\project.pbxproj
       create ios\hope.xcodeproj\xcshareddata\xcschemes\hope.xcscheme
       create android\app\build.gradle
       create android\app\proguard-rules.pro
       create android\app\src\main\AndroidManifest.xml
       create android\app\src\main\res\values\strings.xml
       create android\app\src\main\res\values\styles.xml
       create android\build.gradle
       create android\gradle.properties
       create android\settings.gradle
       create android\app\src\main\res\mipmap-hdpi\ic_launcher.png
       create android\app\src\main\res\mipmap-mdpi\ic_launcher.png
       create android\app\src\main\res\mipmap-xhdpi\ic_launcher.png
       create android\app\src\main\res\mipmap-xxhdpi\ic_launcher.png
       create android\gradle\wrapper\gradle-wrapper.jar
       create android\gradle\wrapper\gradle-wrapper.properties
       create android\gradlew
       create android\gradlew.bat
       create android\app\src\main\java\com\hope\MainActivity.java
    To run your app on iOS:
       Open Y:\hope\ios\hope.xcodeproj in Xcode
       Hit Run button
    To run your app on Android:
       Have an Android emulator running, or a device connected
       cd Y:\hope
       react-native run-android

Then I delete react-native folder from the projects npm_modules made sure that the project is actually using my react-native master clone.

    Y:\>cd hope

    Y:\hope>npm link react-native
    Y:\hope\node_modules\react-native -> C:\Users\bwessels\AppData\Roaming\npm\node_
    modules\react-native -> Y:\react-native

And then I run `react-native run-android'

    Y:\hope>react-native run-android
    Starting JS server...
    Building and installing the app on the device (cd android && gradlew.bat install
    Debug)...
    :app:preBuild UP-TO-DATE
    :app:preDebugBuild UP-TO-DATE
    :app:checkDebugManifest
    :app:preReleaseBuild UP-TO-DATE
    :app:prepareComAndroidSupportAppcompatV72300Library
    :app:prepareComAndroidSupportSupportV42300Library
    :app:prepareComFacebookFrescoDrawee061Library
    :app:prepareComFacebookFrescoFbcore061Library
    :app:prepareComFacebookFrescoFresco061Library
    :app:prepareComFacebookFrescoImagepipeline061Library
    :app:prepareComFacebookFrescoImagepipelineOkhttp061Library
    :app:prepareComFacebookReactReactNative0110Library
    :app:prepareOrgWebkitAndroidJscR174650Library
    :app:prepareDebugDependencies
    :app:compileDebugAidl
    :app:compileDebugRenderscript
    :app:generateDebugBuildConfig
    :app:generateDebugAssets UP-TO-DATE
    :app:mergeDebugAssets
    :app:generateDebugResValues
    :app:generateDebugResources
    :app:mergeDebugResources
    :app:processDebugManifest
    :app:processDebugResources
    :app:generateDebugSources
    :app:processDebugJavaRes UP-TO-DATE
    :app:compileDebugJavaWithJavac
    :app:compileDebugNdk UP-TO-DATE
    :app:compileDebugSources
    :app:preDexDebug
    :app:dexDebug
    :app:validateDebugSigning
    :app:packageDebug
    :app:zipalignDebug
    :app:assembleDebug
    :app:installDebug
    Installing APK 'app-debug.apk' on 'reactnative(AVD) - 6.0'
    Installed on 1 device.

    BUILD SUCCESSFUL

    Total time: 48.545 secs
    Starting the app (adb shell am start -n com.hope/.MainActivity)...
    Starting: Intent { cmp=com.hope/.MainActivity }

And react-native start

    Y:\hope>react-native start
     ┌────────────────────────────────────────────────────────────────────────────┐

     │  Running packager on port 8081.                                            │

     │                                                                            │

     │  Keep this packager running while developing on any JS projects. Feel      │

     │  free to close this tab and run your own packager instance if you          │

     │  prefer.                                                                   │

     │                                                                            │

     │  https://github.com/facebook/react-native                                  │

     │                                                                            │

     └────────────────────────────────────────────────────────────────────────────┘

    Looking for JS files in
       Y:\hope

    [9:10:44 AM] <START> Building Dependency Graph
    [9:10:44 AM] <START> Crawling File System
    [9:10:44 AM] <START> Loading bundles layout
    [9:10:44 AM] <END>   Loading bundles layout (0ms)

    React packager ready.

    [9:10:54 AM] <END>   Crawling File System (9423ms)
    [9:10:54 AM] <START> Building in-memory fs for JavaScript
    [9:10:55 AM] <END>   Building in-memory fs for JavaScript (1248ms)
    [9:10:55 AM] <START> Building in-memory fs for Assets
    [9:10:56 AM] <END>   Building in-memory fs for Assets (951ms)
    [9:10:56 AM] <START> Building Haste Map
    [9:10:56 AM] <START> Building (deprecated) Asset Map
    [9:10:57 AM] <END>   Building (deprecated) Asset Map (159ms)
    [9:10:57 AM] <END>   Building Haste Map (886ms)
    [9:10:57 AM] <END>   Building Dependency Graph (12516ms)
    [9:11:03 AM] <START> request:/index.android.bundle?platform=android
    [9:11:03 AM] <START> find dependencies
    Unable to resolve module image!myIcon from Y:\hope\node_modules\react-native\Lib
    raries\Image\Image.android.js
    Unable to resolve module image!app_logo from Y:\hope\node_modules\react-native\L
    ibraries\Components\ToolbarAndroid\ToolbarAndroid.android.js
    Unable to resolve module image!icon_settings from Y:\hope\node_modules\react-nat
    ive\Libraries\Components\ToolbarAndroid\ToolbarAndroid.android.js
    Unable to resolve module image!some_icon from Y:\hope\node_modules\react-native\
    Libraries\Components\ToolbarAndroid\ToolbarAndroid.android.js
    Unable to resolve module image!myButton from Y:\hope\node_modules\react-native\L
    ibraries\Components\Touchable\TouchableHighlight.js
    Unable to resolve module image!myButton from Y:\hope\node_modules\react-native\L
    ibraries\Components\Touchable\TouchableOpacity.js
    [9:11:03 AM] <END>   find dependencies (217ms)
    [9:11:03 AM] <START> transform
    transforming [========================================] 100% 314/314
    [9:11:07 AM] <END>   transform (4138ms)
    [9:11:07 AM] <END>   request:/index.android.bundle?platform=android (4368ms)
    ::ffff:127.0.0.1 - - [Thu, 24 Sep 2015 21:11:08 GMT] "GET /flow/ HTTP/1.1" 404 -
     "-" "okhttp/2.4.0"

And I still get the same issue, which basically means no Android development possible at the moment.

rn2

@zakelfassi
Copy link

@BerndWessels did you compile ReactAndroid on build.gradle or just use 0.11.+?
The issue disappears if you use the up-to-date ReactAndroid on Master.

@BerndWessels
Copy link
Contributor Author

@zakelfassi Can you please explain how to do that?

@zakelfassi
Copy link

@BerndWessels just did in #2855.

@oliviertassinari
Copy link

I just had the same red screen when trying to run the UIExplorer example.
I'm using the latest master commit (8356b60), ubuntu and a nexus 5.
However, the init project worked successfully for me with react-native@0.11.4.

@ide
Copy link
Contributor

ide commented Oct 9, 2015

Just tested the UIExplorer using master and building from source. We are aiming to release the next RC in a few days.

@chirag04
Copy link
Contributor

👍

@percyteng
Copy link

I'm getting this issue on 0.38.0

@facebook facebook locked as resolved and limited conversation to collaborators Jul 21, 2018
@react-native-bot react-native-bot added the Resolution: Locked This issue was locked by the bot. label Jul 21, 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

9 participants