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.

On Rate, browser opens localhost/null

See original GitHub issue

I’m not sure where I’m going wrong, I’ve used this plugin before without issue. Now with ionic 5 anytime a user clicks on the rate now button on the dialog, on android, the user ends up on a blank website with localhost/null in the address bar. On iOS the popped up dialog just spins then says could not connect.

Config: “@ionic/angular”: “^5.0.0”, “@ionic-native/app-rate”: “^5.29.0”, “cordova-plugin-apprate”: “1.7.1”,

I’ve tried all configurations as seen below to no avail:

this.appRate.preferences = {
          simpleMode: true,
          storeAppURL: {
            ios: '123234',
            android: 'market://details?id=com.example.myapp'
          }
        };
        this.appRate.promptForRating(true);
this.appRate.preferences = {
          openUrl: function(url) {
            window.open(url, '_blank', 'location=yes');
          },
          simpleMode: true,
          storeAppURL: {
            ios: '123234',
            android: 'market://details?id=com.x.myapp'
          }
        };
        this.appRate.promptForRating(true);
this.appRate.preferences = {
          ...this.appRate.preferences,
          simpleMode: true,
          storeAppURL: {
            ios: '123234',
            android: 'market://details?id=com.example.myapp'
          }
        };
        this.appRate.promptForRating(true);

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:4
  • Comments:7

github_iconTop GitHub Comments

9reactions
wnabilcommented, Nov 22, 2020

i confirm the plugin works fine and its @ionic-native/app-rate issue use the AppRate object from window and it should work as expected

    // tslint:disable-next-line: no-string-literal
    const appRate: any = window['AppRate'];
    const preferences = appRate.getPreferences();
    preferences.simpleMode = true;
    preferences.storeAppURL = {
      ios: 'id123456789',
      android: 'market://details?id=com.example.app',
      windows: 'ms-windows-store://review/?ProductId=XXXXXXXX',
    };
    appRate.setPreferences(preferences);
    appRate.promptForRating(true);

possible reference https://github.com/pushandplay/cordova-plugin-apprate/issues/291

2reactions
simonramosbcommented, Nov 20, 2020

Hello! Having the same exact issue, same code as you. Tried everything, lets hope somebody cand help us!

Config: Ionic CLI: 6.11.0 cordova-plugin-apprate: 1.7.1

Read more comments on GitHub >

github_iconTop Results From Across the Web

Chrome can't open localhost:3000 with Gulp / BrowserSync
Navigating to the same URI in Firefox, shows that it works and that BrowserSync is connected. gulp.task('browser-sync', function() { browserSync ...
Read more >
Doesn't work with Ionic 4. · Issue #291 - GitHub
Hello, I can't run the plugin with ionic 4. Can you please help?
Read more >
Chrome always opens http://localhost:3000/user_sessions ...
Every time I launch Chrome on my Mac, it opens a tab with http://localhost:3000/user_sessions/new . I guess this has something to do with ......
Read more >
MediaDevices.getUserMedia() - Web APIs | MDN
First, getUserMedia() must always get user permission before opening any media gathering input such as a webcam or microphone. Browsers may ...
Read more >
Handling Null Values in HTML Templates with Angular
Open a browser and type the following URL in the address bar to launch the application: http://localhost:4200 . You will see the events...
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