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.

This method must be called on the main thread was thrown while invoking showAd

See original GitHub issue

Trying to load an interstitial ad, on touchable opacity press. Displays the error shown in the issue title.

Exception ‘This method must be called on the main thread’ was thrown while invoking showAd on target CTKInterstitialAdManager with params ( “PLACEMENTID”, 30, 31 )

              onPress = {
                () => {
                  this.showFullScreenAd()
                }
              }
  showFullScreenAd() {
    InterstitialAdManager.showAd("PLACEMENT_ID_WAS_HERE").then(didClick => {}).catch(error => {});
  }

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Reactions:1
  • Comments:11 (7 by maintainers)

github_iconTop GitHub Comments

2reactions
satya164commented, Mar 22, 2017

okay, I’ll try to fix it tonight.

0reactions
grabboucommented, May 22, 2017

We bumped the Facebook SDK version for next version, so going to close it.

Read more comments on GitHub >

github_iconTop Results From Across the Web

This method should not be called on the main thread ...
"This method should not be called on the main thread as it may lead to UI unresponsiveness." In my case I've traced it...
Read more >
AtomicReference#compareAndSet bogs down main thread ...
I've tried a bunch of different combinations of method layout where I only get the current map and create a new modified map...
Read more >
Change log | Entities | 0.17.0-preview.42
Fix crash when using singleton access methods with types with generic ... cannot throw exceptions (since called as burst delegate from main thread.) ......
Read more >
Java Applications on Oracle Database
The main() method is called when you enter the following command on the ... If you are not using the command-line interface, you...
Read more >
Scalable Simulation via Direct Execution of Multi-threaded ...
Using our techniques, multi-threaded application software run- ning in virtual hosts will function as intended, while the virtual host threads will not ...
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 Reddit Thread

No results found

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