-
Notifications
You must be signed in to change notification settings - Fork 17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Errorcode: -999 #3
Comments
Hi @meandmyselfinoneperson . That generally occurs when there is a timeout or a bad network connection. Are you still receiving the same error? |
Are you still running into this error? |
Hi @chrisdhaan Thanks for creating this framework! I was trying to write all this from scratch--awful. I am actually get this error after implementing it though. This is my printout:
|
@Pigpocket could I get some more context into what you are trying to do? What OS are you using? you don't have to share the project but could you at least share the call you are trying to make in a Markdown code block? |
Hey @chrisdhaan I'm happy to share the code, it's for a capstone project in a class I'm taking. FYI: I have a whole bunch of organic network code in this project from me trying to build it from scratch... you can just ignore that as it is not related to the error: https://github.com/Pigpocket/MartiniFinder This is the specific call, I dropped the apiKey of course:
|
@chrisdhaan I didn't mention this is in iOS 11.1. Let me know if you need any more info. Thanks, |
Apologies for the slow response @Pigpocket. Had a busy weekend. Looking into this today. |
@chrisdhaan No worries! Just glad this repo exists! |
@Pigpocket I looked in your repo on the |
Whoops! I hadn't committed it yet. Take a look meow and let me know if you see it. It's in the MapViewController. |
Hey @chrisdhaan let me know if there's any other information you need. Your repo seems perfect and I'm trying to implement it as soon as possible! |
@Pigpocket I don't have the ability to commit the changes that will fix you code to the repo. I've opened issues. Fix the issues and your code will work. |
@chrisdhaan thanks for that, I see those and have made the changes but am getting: "searchBusinesses(byTerm) error: An access token must be supplied in order to use this endpoint." I detailed that in the issue on my repo and added you as a collaborator. Thanks so much for your help! |
@Pigpocket I'm not doing your homework for you. This is not an error with a framework. I was able to get businesses returning in your project. |
@chrisdhaan sorry, I wasn't asking for that. I was just curious if your code was built on using the OAuth 2.0 system, as Yelp discontinued use of tokens as of March 1st. I'll try to figure it out on my own. Thanks for your help. |
@Pigpocket the framework is updated for the most up to date authorization system documented by Yelp. I apologize for being short with you but I work full time and develop this framework in my free time for fun. I don't have the time to help with your project. This framework comes with an iOS Example project that works and shows how to use the framework. Have you looked at that? |
@chrisdhaan I got it to work in my project, thanks. I'm curious how to access the isOpenNow property of a business. I can get other properties like id and name via dot notation (business.id, business.name), but I can't seem to get the isOpenNow bool. I see it is an array of type CDYelpHour and I attempt business.hours[0].isOpenNow but I get a nil value. I've tried with different indexes as well without any luck. How do I get that? |
@Pigpocket you won't get access to the hours of a business unless you do an additional API request using the business lookup call. The search call does return businesses, but they do not have all of their information filled in. For an example of the differences in data the two API calls return, see the documentation on the Yelp Developer site for the two endpoints. Business Search: https://www.yelp.com/developers/documentation/v3/business_search Business Lookup: |
Hey @davecom, Ok. I actually originally wrote my own code to make both of those calls separately, one after the other. My second call runs up against the API's QPS rate-limiting. I'm new to networking, but that strikes me as a bit odd... trying to get the isOpenNow property, for say, 20 businesses doesn't seem like it would be hugely taxing on the server (but that could just be because I don't fully understand it). After reading up more on the graphQL type API, my impression was I could embed the second call into the first. My research brought me to this framework, and I was under the impression that's what this framework was doing--though admittedly I'm not entirely sure how--in particular because the CDYelpBusiness class has the 'hours' variable. This is what a Yelper told me on Github:
So... sounds like I will need to make the second API call when using this framework if I want the business hours. I guess I'm just confused because they seem to indicate the second call isn't necessary, but I'm ok sending it so long as I "slow down my requests" Sorry for the novel. |
@Pigpocket This framework does not use the GraphQL API. If you want to do that, you'll need to do that outside of the framework. Using Yelp Fusion (as this framework does) you need two calls (search + business lookup) to get a business's hours. So, yes if you are doing a search (1 API call) and then immediately 20 business lookups (20 more API calls) then you would be exceeding the Yelp limit of 5 API calls/second. |
PS If all you are interested in is finding out what businesses are open now, there is an option for filtering by that in the search endpoint. |
Ok, awesome... that answers my question. Thanks! I do recognize that there is an option to filter only businesses that are open at the moment, but that doesn't align with the intended use case for my app. Thanks for the quick feedback... I know this framework has no commercial component, so I appreciate all the support you and @chrisdhaan have given me so far. Feel free to ignore my questions below, as they don't really fall under the category of "issue", but if/when you have the time, I'm curious.... I know you didn't design the Yelp API, but why would isOpenNow be buried in a second call? Is there an obvious reason for that API architecture? Do you have an intention to update this framework to take advantage of the graphQL framework? How significant of a development effort would that be? Thanks again. It's definitely been a learning experience inspecting your code and I know I have a lot to learn! |
@Pigpocket In response to your first question, I don't know and you would have to ask the Yelp developers. My guess is that they want to keep the amount of bandwidth used by the search API, since it returns multiple businesses at once, limited to essential information. In response to your second question, you would have to ask @chrisdhaan since it's his framework. However, it would be a huge undertaking and my guess is he won't be doing that. |
Yep, makes sense. Thanks again to you both and whoever else helped build and/or support this framework. |
I had the same issue. For me It was trying to access the client before it was finish intializing, i forgot to init the singleton in the app delegate : |
I am still having this issue:
The call I make is:
How can I solve it? And thanks for the repo, once I get it to work it will be super handy. |
@snowzurfer Late answer but I just installed this pod and noticed that if I made the request right after initializing the |
Hi Christopher,
thanks for sharing the CDYelpFusionKit.
With my Xcode 9.1 and Swift 3 installation I run in a network issue after I am authorized and my parameters (e.g. for search) are transferred:
finished with error - code: -999
searchBusinesses(byTerm) failure: cancelled
It seems there is an issue in the CDYelpAPIClient.swift with
I tried hard to find out but couldn't finally solve the issue.
Do you have any idea?
The text was updated successfully, but these errors were encountered: