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

HPPViewControllerFailedWithError delegate function in HPPManager.swift should not be private #27

Open
kevinpalsermtc opened this issue Jun 9, 2020 · 1 comment

Comments

@kevinpalsermtc
Copy link

We saw a crash:

2020-06-09 08:07:10.473734+0100 snappy[11437:2988605] WF: _WebFilterIsActive returning: NO
2020-06-09 08:07:10.474902+0100 snappy[11437:2988605] [ProcessSwapping] 0x11b6181a8 - ProvisionalPageProxy::didFailProvisionalLoadForFrame: pageProxyID=19 webPageID=30, frameID=3, navigationID=3
2020-06-09 08:07:10.475378+0100 snappy[11437:2988605] -[RXPiOS.HPPManager HPPViewControllerFailedWithError:]: unrecognized selector sent to instance 0x11e186280
2020-06-09 08:07:10.492547+0100 snappy[11437:2988605] *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '-[RXPiOS.HPPManager HPPViewControllerFailedWithError:]: unrecognized selector sent to instance 0x11e186280'

Looking at HPPManager it is obvious that:

    private func HPPViewControllerFailedWithError(_ error: Error?) {
        self.delegate?.HPPManagerFailedWithError!(error as NSError?)
        self.genericDelegate?.HPPManagerFailedWithError(error)
        self.hppViewController.dismiss(animated: true, completion: nil)
    }

should be:

    func HPPViewControllerFailedWithError(_ error: NSError?) {
        self.delegate?.HPPManagerFailedWithError!(error as NSError?)
        self.genericDelegate?.HPPManagerFailedWithError(error)
        self.hppViewController.dismiss(animated: true, completion: nil)
    }

Someone used Error instead of NSError as the parameter and to silence the Xcode warning they clicked "fix" making the function private.

alexoverseer added a commit to alexoverseer/rxp-ios that referenced this issue Mar 9, 2021
@kevinpalser
Copy link

Thanks for fixing this in the latest master - please mark this as resolved

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

2 participants