#aadityaaa-swift
1 messages · Page 1 of 1 (latest)
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
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*
What error is showing up from the init?
failed to retrieve the publishable key on line 30
i have added the print statement there
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
should i put my pub key on line 34 ?
okok
no it still says failed to retrieve the pub key
this is what it shows in my terminal
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.
yeaa
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?
how do i do that thing
look i have another terminal opened
and i sent a curl request there
it gives back response
What are you using for a server?
You have to have a backend here... you can't run everything from the front end.
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
Ah okay so you are only developing the front end.
yeaa
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.
so most probably the issue is with the backend right?
my request call is working fine i think
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.