Giter VIP home page Giter VIP logo

Comments (11)

leo6104 avatar leo6104 commented on July 17, 2024 1

It still have this issue.

2021-03-08 00:47:53.633542+0900 App[12713:1076311] [connection] nw_socket_handle_socket_event [C10.1:3] Socket SO_ERROR [54: Connection reset by peer]
2021-03-08 00:47:53.633792+0900 App[12713:1076311] [connection] nw_read_request_report [C10] Receive failed with error "Connection reset by peer"
2021-03-08 00:47:53.634633+0900 App[12713:1075988] WF: _userSettingsForUser : (null)
2021-03-08 00:47:53.634735+0900 App[12713:1075988] WF: _WebFilterIsActive returning: NO
2021-03-08 00:47:57.486468+0900 App[12713:1076311] [connection] nw_write_request_report [C10] Send failed with error "Broken pipe"
2021-03-08 00:47:57.487461+0900 App[12713:1075988] [Process] 0x7fe39104ea20 - [pageProxyID=6, webPageID=7, PID=12719] WebPageProxy::processDidBecomeUnresponsive:

In my case, it also says "Installed" and above message shown. Nothing happen on webview (not reload or something changed)

from capacitor-codepush.

lincolnthree avatar lincolnthree commented on July 17, 2024

I see this message when debugging CodePush.m:374 (void)loadURL:(NSURL*)url. Not sure if it is related:

[WKWebView loadRequest:] must be used from main thread only

The value of url looks correct: /Documents/codepush/deploy/versions/a8d1fe720898460b27442176f206ea1e0e112a057d1dbb2252dec8d424b8fd92/www/index.html

from capacitor-codepush.

lincolnthree avatar lincolnthree commented on July 17, 2024

When app is re-launched after install, it seems like the result of CodePushPackageManager.m:getPendingInstall() is nil

It is not locating the deployed installation.

from capacitor-codepush.

lincolnthree avatar lincolnthree commented on July 17, 2024

Possibly related to this warning in XCode for save/getPendingInstall() methods?

'archivedDataWithRootObject:' is deprecated: first deprecated in iOS 12.0 - Use +archivedDataWithRootObject:requiringSecureCoding:error: instead

from capacitor-codepush.

lincolnthree avatar lincolnthree commented on July 17, 2024

Found the issue, the installMode flag seems to be "IMMEDIATE" regardless of what is passed to CodePush.m:install on line 177.

The code is attempting to retrieve NSNumber data types as NSString which returns nil:

- (void)install:(CAPPluginCall *)call {
    NSString* location = [self getString:call field:@"startLocation" defaultValue:nil];
    NSString* installModeString = [self getString:call field:@"installMode" defaultValue:IMMEDIATE];

Sending a PR.

from capacitor-codepush.

lincolnthree avatar lincolnthree commented on July 17, 2024

PR: #19

from capacitor-codepush.

leo6104 avatar leo6104 commented on July 17, 2024

[WKWebView loadRequest:] must be used from main thread only

This error can cause rendering performance issue during codePush.sync()

Good point!

from capacitor-codepush.

leo6104 avatar leo6104 commented on July 17, 2024

It seems loadURL function implementation has a problem. I change the loadPackage implementation (which invoke loadURL) like below.

- (BOOL)loadPackage:(NSString*)packageLocation {
    NSURL* URL = [self getStartPageURLForLocalPackage:packageLocation];
    if (URL) {
        [self setServerBasePath:URL.path];
        return YES;
    }

    return NO;
}

Instead of calling loadURL function, i just call setServerBasePath. And then it reload the contents to new one. (might be progress to next step) But, i got new error.

In XCode log, it says

⚡️  [error] - ERROR Error: Uncaught (in promise): TypeError: undefined is not an object (evaluating 'uc.notifyApplicationReady')

self setServerBasePath:URL reload content in webview. but it doesn't inject Native plugin proxy object correctly. (CodePush)
I will figure out how to inject proxy object from capacitor core (they might call some functions to inject plugin proxy object)

from capacitor-codepush.

leo6104 avatar leo6104 commented on July 17, 2024

Oh it was just my legacy codepush deployments problem.

I remove all codepush deployments & create new deployments and latest package.
After that, all works.

  1. remove node_modules & package-lock.json
  2. npm install (it will reinstall all plugin deps to latest commit)
  3. www Bundle build ...
  4. npx cap copy
  5. npx cap sync
  6. delete an app in simulator (if already exists)
  7. run on simulator with new code

from capacitor-codepush.

lincolnthree avatar lincolnthree commented on July 17, 2024

@leo6104 Do you feel this bug is resolved? Interested if there's something more that needs to happen. Nice fixes for async & loadURL.

from capacitor-codepush.

leo6104 avatar leo6104 commented on July 17, 2024

@lincolnthree I think we can close this issue. I will keep eye on next release of @capacitor/*. 👍

from capacitor-codepush.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.