nativescript-oauth2 icon indicating copy to clipboard operation
nativescript-oauth2 copied to clipboard

WebView blank after loadFinished in iOS simulator

Open caseyjfer opened this issue 5 years ago • 3 comments

Make sure to check the demo app(s) for sample usage

Make sure to check the existing issues in this repository

If the demo apps cannot help and there is no issue for your problem, tell us about it

When opening my app in iOS simulator of iPhone 7 Plus, after navigating to a webview, it loads the webview but cannot load the content. No errors are thrown and the structure is present, but navigation cannot be completed and the screen stays blank. Works in Preview on iOS and Android. Have not tested on Android emulator (haven't been able to get that to load/build yet).

Which platform(s) does your issue occur on?

  • iOS
  • 12.1
  • iPhone 7 Plus Emulator

Please, provide the following version numbers that your issue occurs with:

  • CLI: 6.3.0
  • Cross-platform modules: 6.3.2
  • Runtime(s): tns-ios - 6.3.0
  • Plugin(s): "dependencies": { "@angular/animations": "^8.2.13", "@angular/common": "^8.2.13", "@angular/compiler": "^8.2.13", "@angular/core": "^8.2.13", "@angular/forms": "^8.2.13", "@angular/platform-browser": "^8.2.13", "@angular/platform-browser-dynamic": "^8.2.13", "@angular/router": "^8.2.13", "@nativescript/angular": "^8.20.3", "@nativescript/theme": "~2.2.0", "nativescript-oauth2": "^2.3.1", "nativescript-ui-sidedrawer": "^8.0.0", "reflect-metadata": "~0.1.12", "rxjs": "^6.4.0", "tns-core-modules": "latest", "zone.js": "~0.9.1" }, "devDependencies": { "@angular/compiler-cli": "^8.2.13", "@ngtools/webpack": "~8.2.0", "nativescript-dev-webpack": "~1.4.0", "typescript": "~3.5.3" }

Please, tell us how to recreate the issue in as much detail as possible.

Open terminal in project, and run the following commands: tns build ios tns run ios --device {device.id.for.iphone.7.plus.emulator}

Wait for device to boot and app to show up. Open app (that has loginWithCompletion in the ngInit block on the main component).

Is there any code involved?

client: TnsOAuthClient = new TnsOAuthClient("tokenServiceProvider");

ngOnInit(): void { let stubFac = {facilityName: "Facs Loading...",facilityCode:'',bootstrapUrl:''}; let stubOrg = {organizationName: "Orgs Loading...", organizationCode:'', facilities: [stubFac]} this.orgObj = new ConfigAddresses([stubOrg]); this.login(); }

login(): void { this.client.loginWithCompletion((tokenResult: ITnsOAuthTokenResult, error) => { if (error) { console.error("Couldn't authenticate"); console.error(error); } else { this.tokenService.setToken(tokenResult); this.bearerToken = tokenResult; console.log("Authenticated: token retrieved"); this.loadInfo(tokenResult.accessToken); } }); }

caseyjfer avatar Jan 23 '20 13:01 caseyjfer

I should also mention, in case there's some sort of plist property I need to set, that I am operating behind a corporate proxy and the service I'm hitting has a self-signed certificate. My tech lead seems to thing that it MAY have something to do with SSL rejecting the call.

caseyjfer avatar Jan 24 '20 15:01 caseyjfer

same situation

sAmanzhol avatar Feb 21 '20 10:02 sAmanzhol

Hi! your issue might be related to something I have just encountered. I would need some more information though. (Issue: #116)

  • what is the openIdSupport? oid-none or oid-full
  • Do you use some nested router outlets?
  • How does you app.component.html look like?

When you login using iOS can you check the logs - Do you find: Presenting view controllers on detached view controllers is discouraged

mpht avatar May 20 '20 13:05 mpht