Starts in:
2 DAYS
5 HRS
5 MIN
54 SEC
Starts in:
2 D
5 H
5 M
54 S
Open Closed

react native #6957


User avatar
0
LiSong created
  • ABP Framework version: v8.0.5
  • UI Type: MVC
  • Database System: EF Core (SQL Server
  • Tiered (for MVC) or Auth Server Separated (for Angular): yes
  • Exception message and full stack trace:
  • Steps to reproduce the issue:

I am trying to run the react native app on my iphone and android simulator, both are failed with there errors ERROR TypeError: _ReanimatedModule.default.createNode is not a function (it is undefined), js engine: hermes ERROR Invariant Violation: "main" has not been registered. This can happen if:

  • Metro (the local dev server) is run from the wrong folder. Check if Metro is running, stop it and restart it in the current project.
  • A module failed to load due to an error and AppRegistry.registerComponent wasn't called., js engine: hermes

are you still maintaining the react native app?


12 Answer(s)
  • User Avatar
    0
    sinan created
    Support Team Angular Developer

    Hi, i have created a new application in version 8.0.5 and it works fine. I couldn't produce your problem. Could you give me more detail?

    I have followed this documentation

  • User Avatar
    0
    LiSong created

    which expo version are you using?

  • User Avatar
    0
    sinan created
    Support Team Angular Developer

    I can give you a sample package.json file for react-native. Try to make them same, it might be work.

    "dependencies": {
        "@expo/react-native-action-sheet": "^4.0.0",
        "@react-native-async-storage/async-storage": "~1.17.11",
        "@react-navigation/drawer": "^6.5.4",
        "@react-navigation/native": "^6.1.0",
        "@react-navigation/native-stack": "^6.9.5",
        "@reduxjs/toolkit": "^1.7.1",
        "@types/react-native": "~0.70.6",
        "axios": "~1.2.1",
        "expo": "^47.0.0",
        "expo-auth-session": "~3.8.0",
        "expo-crypto": "~12.0.0",
        "expo-image-picker": "~14.0.2",
        "expo-random": "~13.0.0",
        "expo-status-bar": "~1.4.2",
        "expo-web-browser": "~12.0.0",
        "formik": "^2.2.9",
        "i18n-js": "^3.8.0",
        "native-base": "^3.4.25",
        "prop-types": "^15.8.1",
        "react": "18.1.0",
        "react-dom": "18.1.0",
        "react-native": "0.70.8",
        "react-native-base64": "^0.2.1",
        "react-native-chart-kit": "^6.11.0",
        "react-native-gesture-handler": "~2.8.0",
        "react-native-paper": "^5.9.1",
        "react-native-reanimated": "~2.12.0",
        "react-native-root-toast": "^3.5.0",
        "react-native-safe-area-context": "4.4.1",
        "react-native-screens": "~3.18.0",
        "react-native-svg": "13.4.0",
        "react-native-web": "~0.18.7",
        "react-redux": "^8.0.5",
        "reanimated-bottom-sheet": "^1.0.0-alpha.22",
        "redux-persist": "^6.0.0",
        "redux-saga": "^1.2.1",
        "typescript": "^4.6.3",
        "yup": "^0.32.11"
    },
    "devDependencies": {
        "@babel/core": "^7.19.3"
    }
    
  • User Avatar
    0
    LiSong created
    "expo": "^47.0.0",
    

    This version is too low, the new Expo Go app does not support it, can you upgrade it?

  • User Avatar
    0
    sinan created
    Support Team Angular Developer

    We have updated in version 8.1. Will be released soon

  • User Avatar
    0
    LiSong created

    May I ask about the approximate release date?

  • User Avatar
    0
    liangshiwei created
    Support Team Fullstack Developer

    You can check the 8.1-final milestone. We'll probably release it next week https://github.com/abpframework/abp/milestone/100

  • User Avatar
    0
    LiSong created

    I can run it now, but after I logged in with username and password, I got this error:

    WARN Possible Unhandled Promise Rejection (id: 6): SyntaxError: JSON Parse error: Unexpected EOF parse@[native code] tryCallOne@http://192.168.1.245:19000/node_modules%5Cexpo%5CAppEntry.bundle?platform=android&dev=true&hot=false:25627:16 http://192.168.1.245:19000/node_modules%5Cexpo%5CAppEntry.bundle?platform=android&dev=true&hot=false:25708:27 http://192.168.1.245:19000/node_modules%5Cexpo%5CAppEntry.bundle?platform=android&dev=true&hot=false:26603:26 _callTimer@http://192.168.1.245:19000/node_modules%5Cexpo%5CAppEntry.bundle?platform=android&dev=true&hot=false:26522:17 _callReactNativeMicrotasksPass@http://192.168.1.245:19000/node_modules%5Cexpo%5CAppEntry.bundle?platform=android&dev=true&hot=false:26552:17 callReactNativeMicrotasks@http://192.168.1.245:19000/node_modules%5Cexpo%5CAppEntry.bundle?platform=android&dev=true&hot=false:26715:44 __callReactNativeMicrotasks@http://192.168.1.245:19000/node_modules%5Cexpo%5CAppEntry.bundle?platform=android&dev=true&hot=false:20131:46 http://192.168.1.245:19000/node_modules%5Cexpo%5CAppEntry.bundle?platform=android&dev=true&hot=false:19943:45 __guard@http://192.168.1.245:19000/node_modules%5Cexpo%5CAppEntry.bundle?platform=android&dev=true&hot=false:20115:15 flushedQueue@http://192.168.1.245:19000/node_modules%5Cexpo%5CAppEntry.bundle?platform=android&dev=true&hot=false:19942:21 flushedQueue@[native code] invokeCallbackAndReturnFlushedQueue@[native code]

    here is my environment.js:

    const yourIP = '192.168.1.245'; // See the docs https://docs.abp.io/en/abp/latest/Getting-Started-React-Native?Tiered=No const port = 44305; //const apiUrl = http://${yourIP}:${port}; const apiUrl = 'https://api.azurewebsites.net/';

    const ENV = { dev: { apiUrl, appUrl: exp://${yourIP}:19000, oAuthConfig: { issuer: 'https://auth.azurewebsites.net', clientId: 'Trust_Mobile', scope: 'offline_access Trust', }, localization: { defaultResourceName: 'Trust', }, }, prod: { apiUrl, appUrl: exp://${yourIP}:19000, oAuthConfig: { issuer: 'https://auth.azurewebsites.net', clientId: 'Trust_Mobile', scope: 'offline_access Trust', }, localization: { defaultResourceName: 'Trust', }, }, };

    export const getEnvVars = () => { // eslint-disable-next-line no-undef return DEV ? ENV.dev : ENV.prod; };

  • User Avatar
    0
    sinan created
    Support Team Angular Developer

    Have you update your appsetting.json, launchSetting.json in your backend?

    If not do the following steps please. https://docs.abp.io/en/commercial/8.0/getting-started-react-native#configure-your-local-ip-address

  • User Avatar
    0
    LiSong created

    yes, I have done it, after I changed these, I could see the auth login page with username and password, it allowed me to log in, but it showed those errors after I logged in but if you check my environment.js, I am using remote auth server and api host, they are hosted in Azure app services

    by the way this is for dev/local environment settings, is there a doc for production settings? https://docs.abp.io/en/commercial/8.0/getting-started-react-native#configure-your-local-ip-address

  • User Avatar
    0
    LiSong created

    hi, can anyone answer my questions here?

  • User Avatar
    0
    liangshiwei created
    Support Team Fullstack Developer

    Hi,

    So, it works on the localhost but not production right?

    Is there any error log on the backend?

Made with ❤️ on ABP v9.1.0-preview. Updated on November 20, 2024, 13:06