question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Inconsistent ”Could not get context for WebGL version 2” error message

See original GitHub issue

System information

  • Have I written custom code (as opposed to using a stock example script provided in TensorFlow.js): no
  • OS Platform and Distribution: macOS 10.15.7 and iOS 14.1
  • Mobile device: iPhone 11
  • TensorFlow.js installed from (npm or script link): https://cdn.jsdelivr.net/npm/@tensorflow/tfjs@2.7.0
  • TensorFlow.js version: 2.7.0
  • Browser version:
    • Safari 14.0 on iOS: Mozilla/5.0 (iPhone; CPU iPhone OS 14_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/14.0 Mobile/15E148 Safari/604.1
    • Safari 14.0.1 on macOS: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/14.0.1 Safari/605.1.15
  • Tensorflow.js Converter Version: ?

Describe the current behavior

Steps to reproduce:

  1. Load https://js.tensorflow.org/api/latest/#add

  2. Click the first Run button

  3. Console log prints:

Could not get context for WebGL version 2
Tensor
    [11, 22, 33, 44]
  1. Click Run again
  2. Console log prints:
Tensor
    [11, 22, 33, 44]

Describe the expected behavior

Expected the log messages in steps 3 and 5 to be identical, including the WebGL error message.

Standalone code to reproduce the issue

Reproducible test case: https://js.tensorflow.org/api/latest/#add

Other info / logs

The latest stable Safari 14 ships with WebGL 2.0 disabled by default. Make sure WebGL 2.0 is disabled via Safari > Experimental WebKit Features to be able to reproduce this issue.

Issue Analytics

  • State:open
  • Created 3 years ago
  • Comments:10

github_iconTop GitHub Comments

1reaction
gauravdhracommented, Jan 27, 2021

i am having same issue on chrome @pyu10055 image

1reaction
pyu10055commented, Nov 20, 2020

@annxingyuan Can you help to confirm? The WebGL 2 check happens on the first API call, once it is identified missing, we will be using WebGL 1 instead. The following API calls would not trigger the warning message.

Read more comments on GitHub >

github_iconTop Results From Across the Web

[Posenet] Inconsistent ”Could not get context for WebGL ...
So I hit a snag with this error ... [Posenet] Inconsistent ”Could not get context for WebGL version 2” error message.
Read more >
[Posenet] Inconsistent ”Could not get context for WebGL ...| 你不知道 ...
Inconsistent ”Could not get context for WebGL version 2” error message ... whether it's possible to force Chrome to use WebGL version 1?...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found