2
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

AndroidのWebViewで「Uncaught TypeError」が出てページ表示ができないときは

Posted at

突如こんなエラーが発生するようになってしまいました。

E/Web Console(1024): Uncaught TypeError: Cannot read property 'some-property' of null at https://example-site.com/example.js:1234

jsが悪いのかなーと疑ったりしたんですがクライアント側の設定を追加すると直りました。
ちなみにjs側ではlocalStorageを使い始めてました。

WebView webView = //... どっかしらから取得
webView.getSettings().setDomStorageEnabled(true);

DOMストレージAPIを使用するために必要とドキュメントに記載もありました。

2
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?