Ionic social share link probelm


#1

i am using social login plugin.
on app.component.ts ,
goLogin() {
this.stopMenuSlide();
this.menuCtrl.close();
this.kProvider.login().then((res:any) => {
this.serverLogin(res);
});
}

when i do console.log() like this.
goLogin() {
this.stopMenuSlide();
this.menuCtrl.close();
console.log();
this.kProvider.login().then((res:any) => {
this.serverLogin(res);
});
}

i can see console.log on chrome by ionic server.

However, when i do console.log() like this
goLogin() {
this.stopMenuSlide();
this.menuCtrl.close();
this.kProvider.login().then((res:any) => {
console.log();
this.serverLogin(res);
});
}

i cannot see console on chrome.

i check the my provider.ts like this.
constructor(private platform:Platform) {
console.log(“it is KProvider”);
}

i can see this console.log() on Chrome.

i have no idea why this one doesn’t work.
goLogin() {
this.stopMenuSlide();
this.menuCtrl.close();
this.kProvider.login().then((res:any) => {
this.serverLogin(res);
});
}

serverLogin(userprofile) {
let userProfile:any = {};

    userProfile.kakaoid = userprofile.id;
    userProfile.email = userprofile.email;
    userProfile.nickname = userprofile.nickname;
    this.userApi.login("auth/login", userProfile).subscribe((res:any) => {
        console.log("LOGIN RES", res);
        this.storage.set("isLogin", true);
        this.storage.set("userProfile", userProfile);
        this.userApi.token = res.token;
        this.userApi.user = userProfile;
        this.showToastWithCloseButton(userProfile.nickname + "success login.");
    },
    (err:any) => { console.log("LOGIN ERROR", err); });
}

please help me to solve this question.

this is my ionic info.
cli packages: (/usr/local/lib/node_modules)

@ionic/cli-utils  : 1.19.2
ionic (Ionic CLI) : 3.20.0

global packages:

cordova (Cordova CLI) : 8.0.0

local packages:

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

System:

Android SDK Tools : 26.1.1
ios-deploy        : 1.9.2
ios-sim           : 6.0.0
Node              : v8.5.0
npm               : 5.3.0
OS                : macOS High Sierra
Xcode             : Xcode 9.2 Build version 9C40b

Thanks.


#2

I can’t find a problem or a question in your post.

But what I can see:

Your Cordova tooling seems to be out of date, which might be causing all kinds of problems.
You can read about how to figure out the current Cordova versions and how to update CLI, platforms and plugins here: https://ionic.zone/cordova/update

Please edit your post, it is not very readable at the moment.
Use the </> button above the input field to format your code, command line output or error message (select the text first, then click the button or wrap it in ``` manually). Check the preview if it looks better. This will make sure your text is readable and if it recognizes the programming language it also automatically adds code syntax highlighting. Thanks.


#3

i try to update cordova platform android .
Then, it shows like this.
(node:863) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): [object Object]
(node:863) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

$ cordova platform list
Installed platforms:
android
ios 4.5.4
Available platforms:
android ~7.0.0
browser ~5.0.1
osx ~4.0.1
windows ~5.0.0
www ^3.12.0


#4

Again, you are showing an error message but not the necessary context: What command did you execute to get this error? Did you remove and re-add the Android platform?


#5

i did. then this message keeps showing.

Using cordova-fetch for cordova-android@~7.0.0
Updating android project…
(node:16995) UnhandledPromiseRejectionWarning: An in-place platform update is not supported.
The platforms folder is always treated as a build artifact in the CLI workflow.
To update your platform, you have to remove, then add your android platform again.
Make sure you save your plugins beforehand using cordova plugin save, and save
a copy of the platform first if you had manual changes in it.
cordova plugin save
cordova platform rm android
cordova platform add android

(node:16995) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 1)
(node:16995) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

even though , re-add platform.