#aadityaaa-swift

1 messages · Page 1 of 1 (latest)

safe lark
#

Hi there! Let me take a look, however server is busy so will need a moment.

#

What is set as your BackendURL?

#

I don't see it in your code

pearl bone
#

one sec

#

i have pasted it in the app file actually

#

like at the very top

#

the first error message is because of this init here

#

as i followed the every first tut i did exactly as told and then still i was not able to retireve my publishable key as i should have

#

very first*

safe lark
#

What error is showing up from the init?

pearl bone
#

failed to retrieve the publishable key on line 30

#

i have added the print statement there

safe lark
#

Ok so let's not worry about that for a second

#

Let's go ahead and hard code your pub key there

#

And see if it works

pearl bone
#

should i put my pub key on line 34 ?

safe lark
#

You put it on line 28 in place of "publishableKey"

#

And comment out line 34

pearl bone
#

okok

#

no it still says failed to retrieve the pub key

#

this is what it shows in my terminal

safe lark
#

Okay that whole code is just to get your pub key from your backend, which you aren't hitting the config endpoint on your backend.

pearl bone
#

yeaa

safe lark
#

So first thing then is to debug the backend. What does the config endpoint look like? Can you add a log there to ensure that you are getting to your backend at all?

pearl bone
#

how do i do that thing

#

look i have another terminal opened

#

and i sent a curl request there

#

it gives back response

safe lark
#

What are you using for a server?

#

You have to have a backend here... you can't run everything from the front end.

pearl bone
#

somone set it up for me i actually have flask and python something, if you get it, i mean i have no idea about it tbh

#

i can ask that person

safe lark
#

Ah okay so you are only developing the front end.

pearl bone
#

yeaa

safe lark
#

So yeah... you are going to need to work with that person as the current issue is that the frontend can't talk to the backend correctly to retrieve your pub key from the backend.

#

If you want to try to move forward without retrieving the publishable key then you can try commenting out all of that pub key code, and hard coding the pub key later on when you need it.

#

But, you are still going to need to be able to hit your backend for future steps as well.

pearl bone
#

so most probably the issue is with the backend right?

#

my request call is working fine i think

safe lark
#

It is hard to say, but mostly the code you shared looks fine to me. Just hard to tell without seeing both frontend and backend.

pearl bone
#

oh okayy

#

thanks for the help tho

#

i would talk to the guy