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

Getting Empty white Screen when page loaded #983

Closed
3 tasks done
perlasivakrishna opened this issue Sep 4, 2020 · 12 comments
Closed
3 tasks done

Getting Empty white Screen when page loaded #983

perlasivakrishna opened this issue Sep 4, 2020 · 12 comments

Comments

@perlasivakrishna
Copy link

perlasivakrishna commented Sep 4, 2020

Bug Report

Problem

What is expected to happen?

Expected to load the content from the passed path.

What does actually happen?

An Empty white screen, WebView is was not added to view hierarchy.

Information

my config.xml

path to file "file:///Users/sivakrishna/Library/Developer/CoreSimulator/Devices/F2FE6906-6DBD-4092-89E6-9887702AB86D/data/Containers/Data/Application/FDAAB79B-4107-40A5-85B4-99FDB7AC71D2/Documents/Books/81002753033019/B366975EC40985B2889EF6FC6CCA5444/content/7984fbad-3258-43e1-aa3e-b606f8c347ee"

Command or Code

Installed pod, Loaded View controller by passing ww folder name as above.

Environment, Platform, Device

Mac OS 10.15.6
iOS
iPhone 11 Simulator

Version information

Xcode 11.5
Cordova iOS 6.1.1 (installed as pod)
cordova CLI 10.0.0

Checklist

  • I searched for existing GitHub issues
  • I updated all Cordova tooling to most recent version
  • I included all the necessary information above

Im not getting any logs in Xcode console or safari debugger.

Note: The same setup/project working fine in Cordova iOS 5.1.1 with WkWebview-Engine
I'm new to cordova, so if you need any further info please let me know where can i find that info/logs.

Do i need to add anything specific in config.xml to work for WKWebview ?

I'm passing fileUrl as www folder path, is that fine?

Thanks in advance.

@timbru31
Copy link
Member

timbru31 commented Sep 4, 2020

Thanks a lot for your issue, however the issue template exists for a reason. 😊
It helps us to debug the issue further and to provide a solution much faster. With important information missing, we unfortunately can't help you.

Therefore, please edit this issue accordingly or close and create a new one and make sure to provide all the required information.

@timbru31 timbru31 closed this as completed Sep 4, 2020
@perlasivakrishna
Copy link
Author

@timbru31 Thanks for the reply, sorry for partial information, I have edited my issue, so please look into it, I'm new to Cordova so please let me know the procedure for further information incase if needed.

Thanks.

@breautek
Copy link
Contributor

breautek commented Sep 4, 2020

I'll go ahead and reopen this issue.

It looks like you're using a platform-centric workflow which is a workflow I'm not very familiar with. It may help if you share some code and xcode logs.

@breautek breautek reopened this Sep 4, 2020
@perlasivakrishna
Copy link
Author

perlasivakrishna commented Sep 4, 2020

@breautek please find the Xcode logs.
cordovaLogs.txt

I have a View Controller which is superclass of "CDVViewController", Presenting controller by specifying the www folder path.

Also I observed none of the Wkwebview delgates called in CDVViewController.m.

@perlasivakrishna
Copy link
Author

perlasivakrishna commented Sep 4, 2020

I have found the work around. Wkwebview delegates Overrided in my class.

- (void)webView:(WKWebView *)webView didFinishNavigation:(WKNavigation *)navigation {
    [webView setHidden:NO];
    [self.view bringSubviewToFront:webView];
}

so I managed to do like this. Not sure is there any better way. I have seen this piece of code where the webview is getting hided.

- (void)createGapView
{
    CGRect webViewBounds = self.view.bounds;
    webViewBounds.origin = self.view.bounds.origin;

    UIView* view = [self newCordovaViewWithFrame:webViewBounds];
    view.hidden = YES;
    view.autoresizingMask = (UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight);

    [self.view addSubview:view];
    [self.view sendSubviewToBack:view];
}

Also there is one more Empty view getting added to view hierarchy, not sure why it was getting added.

Screenshot 2020-09-04 at 8 00 27 PM

If i need to change anything the way I'm handling webview, please suggest me.
Thanks.

@dpogue
Copy link
Member

dpogue commented Sep 4, 2020

The empty view is probably for the splashscreen. You might be running into #929

@JayzeeHuang
Copy link

JayzeeHuang commented Sep 24, 2020

Finally found somthings same as me now, my ios build got an empty page after splash screen and without any errors. I was stuck for few days, hope someone can fix this issue.

Ionic:

Ionic CLI : 6.11.8 (/usr/local/lib/node_modules/@ionic/cli)
Ionic Framework : @ionic/angular 5.3.1
@angular-devkit/build-angular : 0.901.8
@angular-devkit/schematics : 9.1.8
@angular/cli : 9.1.8
@ionic/angular-toolkit : 2.2.0

Cordova:

Cordova CLI : 10.0.0
Cordova Platforms : android 9.0.0, ios 6.1.1
Cordova Plugins : cordova-plugin-ionic-keyboard 2.2.0, cordova-plugin-ionic-webview 5.0.0, (and 18 other plugins)

Utility:

cordova-res : 0.15.1
native-run (update available: 1.1.0) : 1.0.0

System:

ios-deploy : 1.10.0
ios-sim : 8.0.2
NodeJS : v12.16.2 (/usr/local/bin/node)
npm : 6.14.8
OS : macOS Catalina
Xcode : Xcode 12.0 Build version 12A7209

@21pg
Copy link

21pg commented Dec 15, 2020

@JayzeeHuang @perlasivakrishna Did you find any solution on this.

@JayzeeHuang
Copy link

@21pg update all to latest version, use fresh build to compare your current project, remove and readd each plugin will solve this issue.

@bluemaschine
Copy link

@JayzeeHuang I'm using Monaca and have the same problem.

Here is a screenshot : https://ibb.co/h7FVNTZ

One week with no solution, its a bit frustring

@dpogue
Copy link
Member

dpogue commented Apr 16, 2023

I've marked this issue as stale because it's been several years with no further comments. If this is still an issue in the latest cordova-ios version and an up-to-date iOS version, please let us know. Otherwise, this issue will be closed.

@dpogue
Copy link
Member

dpogue commented May 19, 2023

Closing as stale.

@dpogue dpogue closed this as completed May 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants