Skip to content
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

No connections found: Handle changes of location IDs #207

Open
airon90 opened this issue Jul 2, 2016 · 19 comments
Open

No connections found: Handle changes of location IDs #207

airon90 opened this issue Jul 2, 2016 · 19 comments
Labels
beginner job 🔰 This is a relatively easy task suitable for new contributors. bug 🐞 A functional defect or unexpected behavior. upstream 🏞️ Related to an upstream issue.

Comments

@airon90
Copy link
Contributor

airon90 commented Jul 2, 2016

An error is shown when looking for some stations, e.g. Dateo, Milano and Garibaldi Fs, Milano. I don't know if it is a Navitia problem or Transport problem, so I start reporting the bug here ;)

tmp_11333-screenshot_2016-07-02-19-18-3016416914

@grote
Copy link
Owner

grote commented Aug 11, 2016

Do you still have the same problem?

@airon90
Copy link
Contributor Author

airon90 commented Aug 16, 2016

Yes, I'm on holiday and I come back home the day after tomorrow. I'll explain the problem better then

@airon90
Copy link
Contributor Author

airon90 commented Aug 18, 2016

Could you confirm that the latest version of the beta app is still 1.1.3?
This bug seems related to a problem of Navitia APIs as when one searches for "Dateo", the app shows two entries named both "Dateo, Milano", as you can see from the screenshot.

screenshot_2016-08-16-01-38-07

If I choose the first one, this error is shown:

screenshot_2016-08-18-12-28-19

If I choose the second one, all goes well.

Could you check if it is a problem of Navitia APIs, so that I close this bug and open another one in Navitia's forum? Thank you very much!

@grote
Copy link
Owner

grote commented Aug 18, 2016

My theory is that the Italy provider changed its location IDs, so when you search it finds the old one Transportr saved as a favorite and the new one. If you use the old one with the wrong ID, you get the error.

I would need to investigate more to confirm this theory. You could help by checking logcat when you search for both locations and compare the IDs.

@grote grote added bug 🐞 A functional defect or unexpected behavior. needs info ℹ️ More information needed, labels Aug 18, 2016
@airon90
Copy link
Contributor Author

airon90 commented Aug 18, 2016

I'd like to help you. Would you be so kind to tell me what to do? I don't know what logcat is 😕

@grote
Copy link
Owner

grote commented Aug 18, 2016

Some quick pointers:

@airon90
Copy link
Contributor Author

airon90 commented Aug 19, 2016

I finally succeeded in using logcat. Here is the output. I hope this helps!
I don't know why I activated the option "No metro lines" but don't care about it.

@grote
Copy link
Owner

grote commented Aug 19, 2016

Thanks! That's a good start. I only found this once here:

D/AsyncQueryTripsTask(14289): From: Location{STATION, stop_area:OMI:SA:CTP17390, 45468438/9217189, place=Milano, name=Dateo}
D/AsyncQueryTripsTask(14289): To: Location{STATION, stop_area:OMI:SA:CTPGARIBALDIFS, 45483640/9186742, place=Milano, name=Garibaldi Fs}

It would be interesting to know how this changes with the second Dateo that works.

If you could just post these two lines here, that would help.

@airon90
Copy link
Contributor Author

airon90 commented Aug 20, 2016

D/AsyncQueryTripsTask(  337): From: Location{STATION, stop_area:OMI:SA:CTP12166, 45468119/9217718, place=Milano, name=Dateo}
D/AsyncQueryTripsTask(  337): To: Location{STATION, stop_area:OMI:SA:CTPGARIBALDIFS, 45483640/9186742, place=Milano, name=Garibaldi Fs}

@grote
Copy link
Owner

grote commented Aug 20, 2016

Thanks, so Dateo was stop_area:OMI:SA:CTP17390 before and now is stop_area:OMI:SA:CTP12166. Apparently, the old ID doesn't work anymore :(
Would be interesting to know why this ID changed and how app developers are supposed to handle those changes.

@airon90
Copy link
Contributor Author

airon90 commented Aug 20, 2016

If you want to know why they changed IDs to stops and how handle future changes, you can send an email to info@amat-mi.it (I can help you in translating it into Italian).
Now that you know that Dateo changed its ID, how can I delete the old Dateo?

@grote
Copy link
Owner

grote commented Aug 20, 2016

Deleting old favorites is not possible at the moment, because normally(!!!) they don't change. Before talking to amat, I think we should talk to Navitia, because it might have been their fault the IDs changed.

@grote grote changed the title Problems in routing in Milan Location can not be found after Navitia location IDs changed Aug 20, 2016
@airon90
Copy link
Contributor Author

airon90 commented Aug 22, 2016

Are you going to ask Navitia about ID changing or should I do that?

@grote grote changed the title Location can not be found after Navitia location IDs changed Handle Navitia location IDs changes Mar 28, 2017
@grote grote added beginner job 🔰 This is a relatively easy task suitable for new contributors. upstream 🏞️ Related to an upstream issue. and removed needs info ℹ️ More information needed, labels Mar 28, 2017
@grote
Copy link
Owner

grote commented Mar 28, 2017

Meanwhile, I talked with Navitia two times in IRC. There's no real solution so far and probably none coming soon.

We should at least try to show a meaningful error message and a way to recover from that error.

In the API response, there should be a 404 error with an ID unknown_object.
Maybe there is also a response.error.id with one or more of these values: [no_origin, no_destination, no_origin_nor_destination]. But more likely, the unknown stop ID can be found in response.error.message.

Someone would need to investigate the exact API response behavior and then return a proper error code from the AbstractNavitiaProvider (in PTE). Not all that difficult, but needs to be done.

@grote
Copy link
Owner

grote commented Oct 6, 2017

According to PTE upstream, the issue is generally an unsolved problem:

https://groups.google.com/d/msg/public-transport-enabler-discuss/eZK5MdDEDBE/d6rFSe6_AAAJ

@grote grote changed the title Handle Navitia location IDs changes Handle location IDs changes Nov 1, 2017
@grote
Copy link
Owner

grote commented Nov 29, 2017

@dennisguse the code has now somewhat settled, so that you could think about implementing this. I suggest to discuss the general approach here though before starting to write actual code.

@dennisguse
Copy link

@grote Sounds good! I will try to take a look after Xmas!

@grote grote changed the title Handle location IDs changes No connections found: Handle changes of location IDs Jul 26, 2018
@ialokim
Copy link
Collaborator

ialokim commented Sep 9, 2020

@dennisguse the code has now somewhat settled, so that you could think about implementing this. I suggest to discuss the general approach here though before starting to write actual code.

@grote Do you remember what was the idea to implement at this point? As this is a general problem and happens in various providers it would be nice to at least be able to somehow cope with this without clearing the entire app data.

@grote
Copy link
Owner

grote commented Sep 9, 2020

I think the rough idea was to see if we get reliable info to determine that an ID is no longer valid, then either delete everything saved with that ID, so that people can re-add things with the proper ID or try to find the new Id and replace the old one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
beginner job 🔰 This is a relatively easy task suitable for new contributors. bug 🐞 A functional defect or unexpected behavior. upstream 🏞️ Related to an upstream issue.
Projects
None yet
Development

No branches or pull requests

4 participants