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.

Is Send implemented as a Promise?

See original GitHub issue

I am using the following code

    this.sms.send(this.phone, "Dear friend, please call me").then(() => {
      this.showMessage("Message Sent"));
    });

and the message is sent witout any problems, but the then() is never executed

I am using Ionic

and the send method is declared as a Promise like this

    send(phoneNumber: string | string[], message: string, options?: SmsOptions): Promise<any>;

but could it be an error in the Ionic wrapper?

    @ionic/cli-utils  : 1.19.1
    ionic (Ionic CLI) : 3.19.1

global packages:

    cordova (Cordova CLI) : not installed

local packages:

    @ionic/app-scripts : 3.1.8
    Cordova Platforms  : android 6.3.0 browser 5.0.1 ios 4.5.4
    Ionic Framework    : ionic-angular 3.9.2

System:

    Android SDK Tools : 26.1.1
    Node              : v8.9.3
    npm               : 5.5.1
    OS                : Windows 10

Environment Variables:

    ANDROID_HOME : D:\Documents\Android\Sdk

Misc:

    backend : pro

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:5 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
skmasindacommented, Feb 7, 2018

I read your message about the sms Cordova plug-in. It more likely is an ionic problem and is suspect your ‘’‘this.showMessage’‘’ function.

On Feb 7, 2018 14:48, “Thorvald Aagaard” notifications@github.com wrote:

I am using the following code

this.sms.send(this.phone, "Dear friend, please call me").then(() => {
  this.showMessage("Message Sent"));
});

and the message is sent witout any problems, but the then() is never executed

I am using Ionic

and the send method is declared as a Promise like this

send(phoneNumber: string | string[], message: string, options?: SmsOptions): Promise<any>;

but could it be an error in the Ionic wrapper?

@ionic/cli-utils  : 1.19.1
ionic (Ionic CLI) : 3.19.1

global packages:

cordova (Cordova CLI) : not installed

local packages:

@ionic/app-scripts : 3.1.8
Cordova Platforms  : android 6.3.0 browser 5.0.1 ios 4.5.4
Ionic Framework    : ionic-angular 3.9.2

System:

Android SDK Tools : 26.1.1
Node              : v8.9.3
npm               : 5.5.1
OS                : Windows 10

Environment Variables:

ANDROID_HOME : D:\Documents\Android\Sdk

Misc:

backend : pro

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/cordova-sms/cordova-sms-plugin/issues/163, or mute the thread https://github.com/notifications/unsubscribe-auth/AOThTrKWKUdRUkMd3Grb_u4cut3fqlOXks5tSZu4gaJpZM4R8p9I .

0reactions
ThorvaldAagaardcommented, Feb 22, 2018

Using ADB Plugin in chrome allows you to execute the app on a physical device, and still have all the logs going to the browsers javascript console, so I can see the promise is never resolved.

But anyway I have just dropped the idea of giving the user a confirmation message

Read more comments on GitHub >

github_iconTop Results From Across the Web

Promise - JavaScript - MDN Web Docs
A Promise is a proxy for a value not necessarily known when the promise is created. It allows you to associate handlers with...
Read more >
Promise - The Modern JavaScript Tutorial
A promise that is either resolved or rejected is called “settled”, as opposed to an initially “pending” promise. There can be only a...
Read more >
Implementation of Send is missing when calling FutureExt ...
I'm experimenting with futures with WASM, using wasm-bindgen-futures and the rust-webpack-template ; the full working code and problem code is ...
Read more >
[Event Hubs] Improve the current implementation of Sender
The current sender has a promise wrapper around the rhea sender which is based on event emitter pattern. Every time a message is...
Read more >
JavaScript Promises - David Walsh Blog
Promises in the Wild ... The XMLHttpRequest API is async but does not use the Promises API. There are a few native APIs...
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