Starts in:
2 DAYS
22 HRS
9 MIN
55 SEC
Starts in:
2 D
22 H
9 M
55 S
Open Closed

React app not loading on phone #2387


User avatar
0
bolenton@gmail.com created
  • ABP Framework version: v5.0.0 Stable
  • UI type: MVC / React
  • DB provider: MongoDB
  • Tiered (MVC) or Identity Server Separated (Angular): MVC

Created a brand new app from scratch and will mainly be building the mobile app (react) after following this guide https://docs.abp.io/en/commercial/5.0/getting-started-react-native and got the MVC app running at my local IP address, my mobile phone is running on the same network I am able to hit the mvc app from my phone using the ip-address ..

When I run the react app I use the QR code on my iphone to launch the app in expo. However, I am always getting this screen: I don't see any error messages anywhere, so I don't know what's wrong.

AppSettings.json

launchSettings.json

React Environment.js


7 Answer(s)
  • User Avatar
    0
    Mehmet created

    Hello,

    It is probably related to the Expo SDK version. We'll upgrade all packages in React Native template. If you don't like to wait for the new version, you can upgrade the Expo SDK to the latest or you can use android or iOS simulator to run the app. It works on iOS simulator:

  • User Avatar
    0
    bolenton@gmail.com created

    Thanks for you reply, also the second problem I’m having is that when I follow the guide and change the IP address to my local network IP to run react app, I am not able to login to the web project any more. The login keeps redirecting back to the login page. I am having a hard time resolving this issue.

  • User Avatar
    0
    Mehmet created

    What is your web project? MVC, Blazor, or Angular?

  • User Avatar
    0
    bolenton@gmail.com created

    it's MVC.

  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    I am not able to login to the web project any more. The login keeps redirecting back to the login page. I am having a hard time resolving this issue.

    Can you check the app logs?

  • User Avatar
    0
    bolenton@gmail.com created

    2022-01-21 22:59:28.558 -06:00 [INF] Request starting HTTP/1.1 GET http://192.168.4.196:44390/Account/Login?ReturnUrl=%2Fconnect%2Fauthorize%2Fcallback%3Fclient_id%3DRyeShare_Web_Public_Tiered%26redirect_uri%3Dhttp%253A%252F%252F192.168.4.196%253A44306%252Fsignin-oidc%26response_type%3Dcode%2520id_token%26scope%3Dopenid%2520profile%2520role%2520email%2520phone%2520RyeShare%26response_mode%3Dform_post%26nonce%3D637784241969069435.N2Q4NWZhNTUtMjI4Zi00NWQ5LThiYzgtMzM2OWE3NmQ2MTg5NTExMzg5YTctYjQ0Yi00ZTA3LWI4ZjUtYWFlZGM5MTUwOTY4%26state%3DCfDJ8GMaQ6BJ57VPjD_4wQX5Sr9cWj8S4noVfw60f1XpKNavzDaYC4z-ab3KUGgm415_wsuUqn1QL9XcI6SMt-s3a8dFBSSTqaDrJ3a-PA9oMDVypgbVjQOCpneRIsmACZLu_1ru2ha6fFUt3QoxOfHioICtN9CtPikqr2UqcZzm1__aYEN1ApviKzc5uyBXLmYihB6ICDNxM--CbStEsrKJvgK3nXfwNk7LgEvaU0f70HN8zBrehJO5SALGrNbVeapIVdFpb3fwgJ1ZrvM9GuwMF8Kqm0reUAd8YCPIGgvrBRbi%26x-client-SKU%3DID_NETSTANDARD2_0%26x-client-ver%3D6.10.0.0 - - 2022-01-21 22:59:28.559 -06:00 [DBG] Start authorize request protocol validation 2022-01-21 22:59:28.565 -06:00 [DBG] client configuration validation for client RyeShare_Web_Public_Tiered succeeded. 2022-01-21 22:59:28.565 -06:00 [DBG] Checking for PKCE parameters 2022-01-21 22:59:28.565 -06:00 [DBG] No PKCE used. 2022-01-21 22:59:28.581 -06:00 [DBG] Calling into custom validator: IdentityServer4.Validation.DefaultCustomAuthorizeRequestValidator 2022-01-21 22:59:28.583 -06:00 [INF] Executing endpoint '/Account/Login' 2022-01-21 22:59:28.583 -06:00 [INF] Route matched with {page = "/Account/Login", area = "", action = "", controller = ""}. Executing page /Account/Login 2022-01-21 22:59:28.583 -06:00 [INF] Skipping the execution of current filter as its not the most effective filter implementing the policy Microsoft.AspNetCore.Mvc.ViewFeatures.IAntiforgeryPolicy 2022-01-21 22:59:28.587 -06:00 [INF] Executing handler method Volo.Abp.Account.Public.Web.Pages.Account.LoginModel.OnGetAsync - ModelState is "Valid" 2022-01-21 22:59:28.587 -06:00 [DBG] Start authorize request protocol validation 2022-01-21 22:59:28.593 -06:00 [DBG] client configuration validation for client RyeShare_Web_Public_Tiered succeeded. 2022-01-21 22:59:28.593 -06:00 [DBG] Checking for PKCE parameters 2022-01-21 22:59:28.593 -06:00 [DBG] No PKCE used. 2022-01-21 22:59:28.607 -06:00 [DBG] Calling into custom validator: IdentityServer4.Validation.DefaultCustomAuthorizeRequestValidator 2022-01-21 22:59:28.620 -06:00 [DBG] client configuration validation for client RyeShare_Web_Public_Tiered succeeded. 2022-01-21 22:59:28.623 -06:00 [INF] Executed handler method OnGetAsync, returned result Microsoft.AspNetCore.Mvc.RazorPages.PageResult. 2022-01-21 22:59:28.959 -06:00 [WRN] The cookie 'XSRF-TOKEN' has set 'SameSite=None' and must also set 'Secure'. 2022-01-21 22:59:28.963 -06:00 [DBG] Added bundle 'Lepton.Global' to the page in 3.40 ms. 2022-01-21 22:59:28.972 -06:00 [DBG] Added bundle 'Lepton.Global' to the page in 2.81 ms. 2022-01-21 22:59:28.974 -06:00 [INF] Executed page /Account/Login in 390.758ms 2022-01-21 22:59:28.974 -06:00 [INF] Executed endpoint '/Account/Login' 2022-01-21 22:59:28.976 -06:00 [INF] Request finished HTTP/1.1 GET http://192.168.4.196:44390/Account/Login?ReturnUrl=%2Fconnect%2Fauthorize%2Fcallback%3Fclient_id%3DRyeShare_Web_Public_Tiered%26redirect_uri%3Dhttp%253A%252F%252F192.168.4.196%253A44306%252Fsignin-oidc%26response_type%3Dcode%2520id_token%26scope%3Dopenid%2520profile%2520role%2520email%2520phone%2520RyeShare%26response_mode%3Dform_post%26nonce%3D637784241969069435.N2Q4NWZhNTUtMjI4Zi00NWQ5LThiYzgtMzM2OWE3NmQ2MTg5NTExMzg5YTctYjQ0Yi00ZTA3LWI4ZjUtYWFlZGM5MTUwOTY4%26state%3DCfDJ8GMaQ6BJ57VPjD_4wQX5Sr9cWj8S4noVfw60f1XpKNavzDaYC4z-ab3KUGgm415_wsuUqn1QL9XcI6SMt-s3a8dFBSSTqaDrJ3a-PA9oMDVypgbVjQOCpneRIsmACZLu_1ru2ha6fFUt3QoxOfHioICtN9CtPikqr2UqcZzm1__aYEN1ApviKzc5uyBXLmYihB6ICDNxM--CbStEsrKJvgK3nXfwNk7LgEvaU0f70HN8zBrehJO5SALGrNbVeapIVdFpb3fwgJ1ZrvM9GuwMF8Kqm0reUAd8YCPIGgvrBRbi%26x-client-SKU%3DID_NETSTANDARD2_0%26x-client-ver%3D6.10.0.0 - - - 200 - text/html;+charset=utf-8 418.1031ms 2022-01-21 22:59:29.005 -06:00 [INF] Request starting HTTP/1.1 GET http://192.168.4.196:44390/Abp/ApplicationConfigurationScript - - 2022-01-21 22:59:29.005 -06:00 [INF] Request starting HTTP/1.1 GET http://192.168.4.196:44390/_framework/aspnetcore-browser-refresh.js - - 2022-01-21 22:59:29.005 -06:00 [INF] Request finished HTTP/1.1 GET http://192.168.4.196:44390/_framework/aspnetcore-browser-refresh.js - - - 200 11957 application/javascript;+charset=utf-8 0.0528ms 2022-01-21 22:59:29.006 -06:00 [INF] Executing endpoint 'Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.AbpApplicationConfigurationScriptController.Get (Volo.Abp.AspNetCore.Mvc)' 2022-01-21 22:59:29.006 -06:00 [INF] Route matched with {area = "Abp", action = "Get", controller = "AbpApplicationConfigurationScript", page = ""}. Executing controller action with signature System.Threading.Tasks.Task`1[Microsoft.AspNetCore.Mvc.ActionResult] Get() on controller Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.AbpApplicationConfigurationScriptController (Volo.Abp.AspNetCore.Mvc). 2022-01-21 22:59:29.007 -06:00 [DBG] Executing AbpApplicationConfigurationAppService.GetAsync()... 2022-01-21 22:59:29.181 -06:00 [DBG] Executed AbpApplicationConfigurationAppService.GetAsync(). 2022-01-21 22:59:29.187 -06:00 [WRN] The cookie 'XSRF-TOKEN' has set 'SameSite=None' and must also set 'Secure'. 2022-01-21 22:59:29.187 -06:00 [INF] Executing ContentResult with HTTP Response ContentType of application/javascript 2022-01-21 22:59:29.187 -06:00 [INF] Executed action Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.AbpApplicationConfigurationScriptController.Get (Volo.Abp.AspNetCore.Mvc) in 181.0128ms 2022-01-21 22:59:29.187 -06:00 [INF] Executed endpoint 'Volo.Abp.AspNetCore.Mvc.ApplicationConfigurations.AbpApplicationConfigurationScriptController.Get (Volo.Abp.AspNetCore.Mvc)' 2022-01-21 22:59:29.187 -06:00 [INF] Request finished HTTP/1.1 GET http://192.168.4.196:44390/Abp/ApplicationConfigurationScript - - - 200 132671 application/javascript 183.0071ms

  • User Avatar
    0
    maliming created
    Support Team Fullstack Developer

    2022-01-21 22:59:29.187 -06:00 [WRN] The cookie 'XSRF-TOKEN' has set 'SameSite=None' and must also set 'Secure'.

    You can try this.

    https://community.abp.io/posts/patch-for-chrome-login-issue-identityserver4-samesite-cookie-problem-weypwp3n

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