Console error “CGAffineTransformInvert: singular m

2020-07-18 07:21发布

First and foremost, I have searched this thoroughly and I'm not convinced with any solution to start.

I have a simple UIWebView wrapper and we have our code deployed on a static server. The URL of our server is the loading URL of the UIWebView, if there isn't any valid JSessionID, it redirects to the login page(from the client) which redirects back to our server when a successful JSessionID is captured.

The console displays the following error

Anshuks-MacBook-Pro-2.local xyz[40332] <Error>: CGAffineTransformInvert: singular matrix.
Anshuks-MacBook-Pro-2.local xyz[40332] <Error>: CGAffineTransformInvert: singular matrix.
Anshuks-MacBook-Pro-2.local xyz[40332] <Error>: CGAffineTransformInvert: singular matrix.
Anshuks-MacBook-Pro-2.local xyz[40332] <Error>: CGAffineTransformInvert: singular matrix.
Anshuks-MacBook-Pro-2.local xyz[40332] <Error>: CGAffineTransformInvert: singular matrix.
Anshuks-MacBook-Pro-2.local xyz[40332] <Error>: CGAffineTransformInvert: singular matrix.
Anshuks-MacBook-Pro-2.local xyz[40332] <Error>: CGAffineTransformInvert: singular matrix.
Anshuks-MacBook-Pro-2.local xyz[40332] <Error>: CGAffineTransformInvert: singular matrix.
Anshuks-MacBook-Pro-2.local xyz[40332] <Error>: CGAffineTransformInvert: singular matrix.
Anshuks-MacBook-Pro-2.local xyz[40332] <Error>: CGAffineTransformInvert: singular matrix.
Anshuks-MacBook-Pro-2.local xyz[40332] <Error>: CGAffineTransformInvert: singular matrix.
Anshuks-MacBook-Pro-2.local xyz[40332] <Error>: CGAffineTransformInvert: singular matrix.
Anshuks-MacBook-Pro-2.local xyz[40332] <Error>: CGAffineTransformInvert: singular matrix.

though the functionality is working perfect. But i receive these logs in console.

When I try to replace the URL with "google", "facebook" or even the login page directly, I dont receive any error. I have tried commenting the CSS and JQuery code, and its still the same.

Please give me some insight as to what is wrong here.

2条回答
SAY GOODBYE
2楼-- · 2020-07-18 07:56

I was getting this error but I wasn't using a UIWebView. It turned out that the font I was using for an UILabel had a point size of zero... [UIFont fontWithName:@"AFontName" size:0]

查看更多
祖国的老花朵
3楼-- · 2020-07-18 08:02

Use Safri 6 Web Inspector and iOS 6 to inspect your web page.

First, delete some node in the inspector. If deleting one node eliminates the "singular matrix" error, then reload the page and inspect CSS styles of that node.

Uncheck CSS styles of that node one by one. Usually when checking or unchecking one style, some error messages appear. But if unchecking one certain CSS style eliminates error message, then you find the root cause.

For me, it's the display: inline-block style of one <div> causes such errors.

查看更多
登录 后发表回答