He creado e implementado el proyecto abp.io en Azure. He creado la aplicación DB y Web con éxito.

Ahora estoy explorando la interfaz móvil de React. Estoy intentando apuntar la aplicación React a localhost o al servidor Azure.

He configurado las variables de entorno 'apiUrl' y 'emisor' en mi IP y mi sitio web azure según la documentación (https://docs.abp.io/en/abp/latest/Getting-Started-React-Native) y obtiene el mismo error que se muestra a continuación.

Error de localhost:

Network Error

The above error occurred in task fetchAppConfig
    created by takeLatest(app/fetchAppConfigAsync, fetchAppConfig)
    created by _callee
    created by rootSaga
Tasks cancelled due to error:
takeLatest(app/fetchAppConfigAsync, fetchAppConfig)
takeLatest(app/setLanguageAsync, setLanguage)
takeLatest(app/logoutAsync, logout)

Error de Azure:

Request failed with status code 500
- node_modules\axios\lib\core\createError.js:15:17 in createError
- node_modules\axios\lib\core\settle.js:16:9 in settle
- node_modules\axios\lib\adapters\xhr.js:53:6 in handleLoad
- node_modules\event-target-shim\dist\event-target-shim.js:818:20 in EventTarget.prototype.dispatchEvent
- node_modules\react-native\Libraries\Network\XMLHttpRequest.js:592:4 in setReadyState
- node_modules\react-native\Libraries\Network\XMLHttpRequest.js:395:6 in __didCompleteResponse   
- node_modules\react-native\Libraries\vendor\emitter\EventEmitter.js:189:10 in emit
- node_modules\react-native\Libraries\BatchedBridge\MessageQueue.js:416:4 in __callFunction
- node_modules\react-native\Libraries\BatchedBridge\MessageQueue.js:109:6 in __guard$argument_0  
- node_modules\react-native\Libraries\BatchedBridge\MessageQueue.js:364:10 in __guard
- node_modules\react-native\Libraries\BatchedBridge\MessageQueue.js:108:4 in callFunctionReturnFlushedQueue
* [native code]:null in callFunctionReturnFlushedQueue

The above error occurred in task fetchAppConfig
    created by takeLatest(app/fetchAppConfigAsync, fetchAppConfig)
    created by _callee
    created by rootSaga
Tasks cancelled due to error:
takeLatest(app/fetchAppConfigAsync, fetchAppConfig)
takeLatest(app/setLanguageAsync, setLanguage)
takeLatest(app/logoutAsync, logout)

Animated: `useNativeDriver` was not specified. This is a required option and must be explicitly set to `true` or `false`
.
.
.
* [native code]:null in callFunctionReturnFlushedQueue
0
INeedHelpPlz 22 ene. 2021 a las 05:41

1 respuesta

La mejor respuesta

Tuve el mismo problema e hice lo siguiente:

  1. Usando HTTP, no HTTPS [creo que esto puede resolver su problema con azure]
  2. Usar Conveyor para obtener una URL para mi aplicación web local en su lugar de usar localhost ya que localhost no está definido para el móvil
1
Ahmed Khaled 25 ene. 2021 a las 01:09