https://supertokens.com/ logo
#support-questions
Title
# support-questions
v

vishalc

12/06/2022, 1:17 PM
@rp I am facing an issue for ios after login call auto call api as a loop (auth/session/refresh), I am using Ionic 6. Log in successfully, get a token, and store local storage with Axios.
r

rp

12/06/2022, 1:18 PM
hey @vishalc
@nkshah2 can help with this.
But he may not be available for this week - so he can surely help next week, or if he gets time sometime this week
He says that he can help today evening sometime.
v

vishalc

12/06/2022, 1:24 PM
if available now or it is possible tomorrow morning 10:00 ?
r

rp

12/06/2022, 1:24 PM
now is not possible
will wait for @nkshah2 to see if he is available tomorrow morning
v

vishalc

12/06/2022, 1:28 PM
Tomorrow available any time, please reply on this
r

rp

12/06/2022, 1:29 PM
Sure. Will wait for @nkshah2
n

nkshah2

12/06/2022, 2:22 PM
Not sure about what time exactly but I’ll message here tomorrow morning and we can take a look
Hey @vishalc, The same code is working on android but not on ios correct?
v

vishalc

12/07/2022, 8:39 AM
yes
show error (Unhandled Promise rejection: Please provide a valid domain name ; Zone: ; Task: Promise.then)
n

nkshah2

12/07/2022, 8:43 AM
Can I see the frontend code for when you call SuperTokens init
v

vishalc

12/07/2022, 8:46 AM
addCustomInterceptorsToGlobalFetch(); SuperTokens.init({ appInfo: { apiDomain: 'http://localhost:8080', apiBasePath: "/auth", appName: "Commercial", }, recipeList: [ Session.init({ override: { functions: (oI) => { return { ...oI, // this override is only required if you are using axios addAxiosInterceptors: function (input) { addCustomInterceptosToAxios(input); return oI.addAxiosInterceptors(input); }, signOut: async function (input) { console.log("input", input) await oI.signOut(input); localStorage.removeItem("st-cookie"); }, }; }, }, }), EmailPassword.init(), ], });
n

nkshah2

12/07/2022, 8:47 AM
Hmm this seems like an ionic specific problem with ios, can you open an issue about this? We can take a proper look at it
v

vishalc

12/07/2022, 8:47 AM
iOS: capacitor://localhost Android: http://localhost
this is defualt use
n

nkshah2

12/07/2022, 8:49 AM
That’s the app url and not the api domain correct?
Can you post the full stack trace for the error?
v

vishalc

12/07/2022, 8:53 AM
/** * Configure the local scheme on iOS. * * [Can't be set to schemes that the WKWebView already handles, such as http or https] * where the default scheme on iOS is
ionic
. * * @since 1.2.0 * @default capacitor */ iosScheme?: string;
n

nkshah2

12/07/2022, 8:54 AM
I meant for the error you sent earlier
v

vishalc

12/07/2022, 8:57 AM
[error] - Unhandled Promise rejection: Please provide a valid domain name ; Zone: ; Task: Promise.then ; Value: {} T@capacitor://localhost/main.38b8ccfc0b14c5e7.js:1:555342 F@capacitor://localhost/main.38b8ccfc0b14c5e7.js:1:555571 h@capacitor://localhost/main.38b8ccfc0b14c5e7.js:1:570751 l@capacitor://localhost/main.38b8ccfc0b14c5e7.js:1:572891 @capacitor://localhost/main.38b8ccfc0b14c5e7.js:1:532300 De@capacitor://localhost/main.38b8ccfc0b14c5e7.js:1:527094 @capacitor://localhost/main.38b8ccfc0b14c5e7.js:1:526037 l@capacitor://localhost/polyfills.3ebd5e0cff18d293.js:1:18807 @capacitor://localhost/main.38b8ccfc0b14c5e7.js:1:525751 @capacitor://localhost/main.38b8ccfc0b14c5e7.js:1:561117 D@capacitor://localhost/main.38b8ccfc0b14c5e7.js:1:560604 @capacitor://localhost/main.38b8ccfc0b14c5e7.js:1:559620 l@capacitor://localhost/polyfills.3ebd5e0cff18d293.js:1:18807 @capacitor://localhost/main.38b8ccfc0b14c5e7.js:1:559370 @capacitor://localhost/8372.9f0347155041a7b1.js:1:21570 loadIcon@capacitor://localhost/8372.9f0347155041a7b1.js:1:22054 @capacitor://localhost/8372.9f0347155041a7b1.js:1:20728 waitUntilVisible@capacitor://localhost/8372.9f0347155041a7b1.js:1:21034 connectedCallback@capacitor://localhost/8372.9f0347155041a7b1.js:1:20676 On@capacitor://localhost/main.38b8ccfc0b14c5e7.js:1:117763 Ge@capacitor://localhost/main.38b8ccfc0b14c5e7.js:1:122050 @capacitor://localhost/main.38b8ccfc0b14c5e7.js:1:121648 generatorResume@[native code] r@capacitor://localhost/main.38b8ccfc0b14c5e7.js:1:923370 f@capacitor://localhost/main.38b8ccfc0b14c5e7.js:1:923573 @capacitor://localhost/main.38b8ccfc0b14c5e7.js:1:923632 l@capacitor://localhost/polyfills.3ebd5e0cff18d293.js:1:18807 @capacitor://localhost/main.38b8ccfc0b14c5e7.js:1:923524
n

nkshah2

12/07/2022, 8:58 AM
I’d recommend opening an issue for this
v

vishalc

12/07/2022, 9:01 AM
for supertokens or capacitor ?
n

nkshah2

12/07/2022, 9:02 AM
SuperTokens
v

vishalc

12/07/2022, 9:03 AM
discord or git ???
r

rp

12/07/2022, 9:03 AM
git
you can't open issues on discord.
v

vishalc

12/07/2022, 9:03 AM
ok
r

rp

12/07/2022, 9:03 AM
also @vishalc - @nkshah2 is a bit busy this week. So he may not be able to reply to you until next week. So please be patient
If you want fast replies + support, we can setup a support subscription for you. We can discuss the pricing over a call.
v

vishalc

12/07/2022, 9:04 AM
ok
@nkshah2 Any update ?
n

nkshah2

12/21/2022, 4:42 AM
I replied on the GitHub issue
v

vishalc

12/21/2022, 7:02 AM
@nkshah2 I have done changes as per your comment but that did not help. I have attached the code in git, please let me know if anything else is required
n

nkshah2

12/21/2022, 8:00 AM
Its hard to tell because we cannot replicate the issue, please provide a minimal example with your setup that has the issue
v

vishalc

12/22/2022, 9:47 AM
@nkshah2 Can you give an id (Gmail etc..) I'll provide my application and backend code
n

nkshah2

12/22/2022, 9:48 AM
Ive DMed you
v

vishalc

12/22/2022, 10:31 AM
I sent the code to your Id and I used node v 17.0.0
n

nkshah2

12/22/2022, 10:32 AM
Alright ill take a look
v

vishalc

12/24/2022, 5:04 AM
Any update ?
n

nkshah2

12/24/2022, 5:05 AM
I’ll be looking into it sometime next week, I’ll update here when I do
Hi @vishalc I got your server running but im having troubles getting the ios app to run. Might be easier to get on call and debug that way. Let me know if that works and ill send you a link
v

vishalc

12/29/2022, 10:01 AM
sure
i'll ping once i run it on my mac
@nkshah2 are you available for the call?
n

nkshah2

12/29/2022, 1:22 PM
Hey not at the moment no, I can do anytime after 2pm IST tomorrow though
v

vishalc

12/29/2022, 1:23 PM
sure
n

nkshah2

12/30/2022, 9:54 AM
@vishalc Ill be available till 6:30 PM IST for the call
let me know
v

vishalc

12/30/2022, 10:47 AM
i am available now
n

nkshah2

12/30/2022, 10:47 AM
Alright, give me 5 and ill send a link
v

vishalc

12/30/2022, 10:48 AM
ok
n

nkshah2

12/30/2022, 11:01 AM
@vishalc DMed you a link
v

vishalc

01/03/2023, 4:48 AM
Already set set-cookie in refresh API
n

nkshah2

01/03/2023, 7:50 AM
We have a change coming to the frontend sdks to make this easier (should be out soon). I would recommend waiting for that because its a little hard to pinpoint the error in this case
2 Views