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

Error fetching floor plan. [ Service Error: Bad Request ] #223

Open
butbut1314 opened this issue Mar 18, 2018 · 40 comments
Open

Error fetching floor plan. [ Service Error: Bad Request ] #223

butbut1314 opened this issue Mar 18, 2018 · 40 comments
Assignees

Comments

@butbut1314
Copy link

I am using the anyplace server not my own server.

I get an serivce error bad request when I try to fetch the floor plan. I am already using the new backend of the anyplace server. I have no problem fetching old floor plan that was created before. But floor plan that was created after yesterday will give service error bad request. I tried to use the developers and found out that in "Download Tiles/floortiles/:buid/:floor_number Fetches the floor plan tiles zip link" will give an 400 error. I think this might be the case?

Thanks

@MondayDev
Copy link

Exact same issue

@pierdavpic
Copy link

+1

@StarkSoftware
Copy link

also for me, "Download Tiles/floortiles/:buid/:floor_number Fetches the floor plan tiles zip link" will give an 400 error. but Download Base64/floorplans64/:buid/:floor_number works

@westlakem
Copy link

How do we fix this? I have a demonstration in less than a week that I need to prepare for.

@Alexandratz
Copy link

Same here...While every building/floor that I created before the server changes is available, I can see anything that I created after that only in the viwer/architect (on Android app I am getting - Error fetching floor plan). I am using the ap.cs.ucy.ac.cy

@Costantinos
Copy link
Member

Hello,
Is your building public? If so could you tell me the building's name so I can look into the issue?

@StarkSoftware
Copy link

StarkSoftware commented Apr 23, 2018

This is my Building ID : building_417b84ac-8364-49e5-9d81-e50ba5d431e8_1523627366394

This post : https://ap.cs.ucy.ac.cy/anyplace/floorplans64/building_417b84ac-8364-49e5-9d81-e50ba5d431e8_1523627366394/0 works

https://ap.cs.ucy.ac.cy/anyplace/floortiles/building_417b84ac-8364-49e5-9d81-e50ba5d431e8_1523627366394/0 NOT works

It appears that the server does not generate the ZIP file to be downloaded

@Alexandratz
Copy link

Alexandratz commented Apr 23, 2018

Thank you for your fast response.

Yes, the building is public.
The building Id is: building_a2bcf869-f6bf-4f79-a101-7d4ed3f06976_1523475614370

Building Info:
"buid": "building_a2bcf869-f6bf-4f79-a101-7d4ed3f06976_1523475614370",
"name": "Πανεπιστήμιο Μακεδονίας",
"description": "University of Macedonia",
"coordinates_lat": "40.625214834611135",
"coordinates_lon": "22.95997901593853"

@StarkSoftware
Copy link

From Android app when call api to download zip file for floor

https://ap.cs.ucy.ac.cy/anyplace/floortiles/zip/building_417b84ac-8364-49e5-9d81-e50ba5d431e8_1523627366394/0

return {"message":"File requested not found","status_code":404,"status":"error"}

@Costantinos
Copy link
Member

Hello,
I have applied a quick fix on the server. If you re-upload the floor plans then should be ok.

@westlakem
Copy link

@Costantinos can you let us know what the fix was or upload it to Github? We are running the server locally for our demonstration and would like to get it working.

@Costantinos
Copy link
Member

Hello @westlakem,

You need to put the directory of the tiler into the working directory of the anyplace instance, then fix the permissions for the files and you may need to create a symbolic link.

Additionally, you need to install ImageMagick, advancecomp and Python 2.7+. You can install them with the following commands:
sudo yum install -y ImageMagick ImageMagick-devel
sudo yum install advancecomp

@westlakem
Copy link

@Costantinos has the tiler been bundled into the downloadable zip yet? Trying real hard not to have to pull down and recompile the whole thing.

@Costantinos
Copy link
Member

@westlakem, I have uploaded the anyplace tiler as a separate zip, you can download the (tiler)[http://anyplace.cs.ucy.ac.cy/downloads/anyplace_tiler.zip] as a separate directory and move it to the anyplace working directory as I have described early.

@westlakem
Copy link

@Costantinos ok... I'll start the process of setting up the dev environment. Thanks!

@westlakem
Copy link

@Costantinos @anyplaceucy

I've added the tiler to the public folder, and made sure to install imagemagick and advancecomp on our app server and I'm still getting a 400: {"message":"Could not create floor plan tiles on the server!","status_code":400,"status":"error"}.

image

If you would like, I can upload the zip that we're launching on AWS, with the caviat that we will need to scrub information about our couch base instance, and server URL.

@Alexandratz
Copy link

@Costantinos I just reuploaded the floorplans, indeed is working but the image is really smaller than on the architect, this has as result for the image to be just in the corner of the building (I am sure I can't explain it well, so, please check the image below).

  • Also, I don't know, if this is a new issue or it was caused by the quick fix,but the crushing issue of outdoors search that was resolved in version 2.5.0 ....now is back.
  • Except of that userData.getPositionWifi() today always returns null (I am in the exact same place, same network as all the previous days that I was testing the app)
    I am sorry for the long message I just can't understand if all these are new issues or they are consequences of the changes applied backend.
    image

@anyplaceucy
Copy link
Contributor

Please try the below and get back if the problem persists:
https://github.com/dmsl/anyplace/wiki/Markers-in-map-(viewer)-are-displayed-wrong

@anyplaceucy
Copy link
Contributor

Timothee, can you please check if the Android version faces any problem with the latest backend fixes?

@anyplaceucy
Copy link
Contributor

@Alexandratz : for fixing the positioning of the building in Android, follow the link listed above. Also clear your building cache on Android

@Costantinos
Copy link
Member

Hello @westlakem ,

You need to put the tiler under the home directory (anyplace_v3) of the project not in the public directory. Your directory should have the following directories and files.

anyplace_tiler
bin
conf
floor_plans
lib
logs
radiomaps_frozen
README.md
RUNNING_PID
share

@westlakem
Copy link

@Costantinos @anyplaceucy

Thank you for all your help so far. I'm still getting an error, and i'm not 100% sure why....

[�[31merror�[0m] application - Tiling for image[floor_plans/building_65d04b69-8109-4587-818d-685f3fe253f2_1524691031812/fl_7/fl_7] failed with IOException[Cannot run program "anyplace_tiler/start-anyplace-tiler.sh": error=2, No such file or directory]!

But i have the anyplace_tiler in the directory

image

I've verified by SSH that the floor_plans and static_tiles folders are created, so the only thing I can think of is that it comes down to how the ProcessBuilder tries to start the application in combination with deploying the app to AWS and the procfile

Procfile:

web: sh -c "rm /var/app/current/RUNNING_PID; chmod 755 /var/app/current/bin/anyplace_v3; cd /var/app/current; bin/anyplace_v3"

I would be grateful for any assistance that you could provide.

@Costantinos
Copy link
Member

Hello,

It seems that the .sh file is not executable. Try to apply execute permissions to all the .sh files by using the command chmod +x *.sh.

@GmottNew
Copy link

GmottNew commented Apr 26, 2018

Hi @Costantinos,
I also get the Bad Request error.
My building id is: 878023c1-9041-411b-8239-b203fddf4bcd_1523877361984.

It seems like it dose'nt recognize that I have any floors.

I would appreciate your help.

@vaibhavdes
Copy link

@Costantinos I am running Anyplace Server on LocalHost (built project using IntelliJ) also added Building and Floors, but now When I access the same in Android Client, it shows building name and detect floor but not able to load floor shows error "Error Fetching Floor Plan"
Also When I access localhost:9000/anyplace it shows exception error

@westlakem
Copy link

@Costantinos I'll give that a try over the weekend, but it says it can't find the file, not that it can't execute the file..

@erezak
Copy link

erezak commented May 17, 2018

Still happening on a local server, even though the log shows - after uploading floor:

[info] application - LPLogger::Info:: requested: floor_plans/building_ed9c4575-e33a-4e47-8c78-f079f2569b5d_1526545176541/fl_1/fl_1
[info] application - LPLogger::Info:: Floorplan Request[json]: {"top_right_lat":"31.986250587598217","buid":"building_ed9c4575-e33a-4e47-8c78-f079f2569b5d_1526545176541","owner_id":"108119603360412596177_google","bottom_left_lat":"31.98604754511678","top_right_lng":"34.91118684491062","floor_number":"1","bottom_left_lng":"34.910757691468234"}
[info] application - LPLogger::Info:: Floorplan Request[floorplan]: blob

[info] application - LPLogger::Info:: AnyplaceMapping::serveFloorPlanTilesZip(): {"username":"username","password":"pass"}
[info] application - LPLogger::Info:: requested: floor_plans/building_ed9c4575-e33a-4e47-8c78-f079f2569b5d_1526545176541/fl_1/static_tiles/tiles_archive.zip
[info] application - LPLogger::Info:: Successfully tiled [floor_plans/building_ed9c4575-e33a-4e47-8c78-f079f2569b5d_1526545176541/fl_1/fl_1]

Strangely, the tiling isn't logged until the Android client requests the floor,.

@erezak
Copy link

erezak commented May 20, 2018

I added the zip package and it seems to be working now.
sudo apt-get install zip -y

@vaibhavdes
Copy link

@erezak need your help regarding the Tiler Problem
not able to load floor shows error "Error Fetching Floor Plan"
Also When I access localhost:9000/anyplace it shows exception error

can you please share your email id or other contact

@joaohenrique89
Copy link

joaohenrique89 commented Jun 29, 2018

I have tried to fix this issue on my local machine and I fixed. However, when I tried to install on another machine the same issue happened again and this time I've done the same things that I did the first time, but it didn't work. I did change the permission on the sh files inside anyplace_tiles, I've installed python 2.7.x, imagemagik 7.x, advancecomp and png package. After all this, still not working... Same error. It seems that the directories floor_plans and radio_maps do not get created. Then the floor does not get saved and therefore there is an error when the app tries to fetch the floor plan. Any thoughts?
Another issue that I found is that when I zoom to close the map disappear.
Thanks in advance. @Costantinos

@joaohenrique89
Copy link

Another thing that I noticed is that when I run on Intellij in development mode, it works fine. But when I run on production mode, it does create the floor_plan directory, but it is inaccessible, and that is cause of all the problems.

@sankarNarayanan
Copy link

We have tried all the above solutions and still this issue is not resolved.

Can you please help with a small write up on what is to be done?

@joaohenrique89
Copy link

joaohenrique89 commented Jul 25, 2018 via email

@sankarNarayanan
Copy link

sankarNarayanan commented Jul 26, 2018

@joaohenrique89

Thanks a lot for the response.

Can you please help us with the files where you modified these? We are pretty new to Anyplace and this would be really helpful.

@TanyaKansal
Copy link

I am still facing the same issue.Can you suggest some solution regarding this.
@joaohenrique89 Can you please help us with the files wherein you used Files.exists(...) and Files.isReadable(...) instead of file.exists() and where you changed files.mkdirs() to Files.createDirectory().

@TanyaKansal
Copy link

@anyplaceucy
The tiler is not working properly on the local server. Is there anyone who has got the anyplace tiler working properly?

@plinkos
Copy link

plinkos commented Nov 7, 2018

Floor plan seems to still error out upon uploading to a building. Has anyone come up with a solution yet?

@YugankRastogi
Copy link

YugankRastogi commented Jun 20, 2019

I am still facing the same problem. This is using the anyplace server.

@taniakysla
Copy link

Floor plan image is not stored for me as well. Steps I did:

  1. setup server on local PC from instruction "for administrators"
  2. install all needed tools (python, imagemagik, advancecomp)
  3. put anyplace_tiler folder to the anyplace_v3-4.0 folder
  4. make all scripts executable
  5. give write/read access to hole folder anyplace_v3-4.0
  6. re-run anyplace, choose image for floor 1, set sizes, save (got message about success)
  7. after architect reload - there is no floor image and folder floor_plans/building_993f332c-b3af-4cf7-830f-405432e31257_1580238352321/fl_1 is empty

No any errors in logs:
[info] application - LPLogger::Info:: requested: floor_plans/building_993f332c-b3af-4cf7-830f-405432e31257_1580238352321/fl_1/fl_1
[info] application - LPLogger::Info:: AnyplaceMapping::poisByFloor(): {"username":"username","password":"password","buid":"building_993f332c-b3af-4cf7-830f-405432e31257_1580238352321","access_token":"hide","floor_number":"1"}
[info] application - LPLogger::Info:: Floorplan Request[json]: {"top_right_lat":"37.37764162525489","buid":"building_993f332c-b3af-4cf7-830f-405432e31257_1580238352321","owner_id":"103149400828732292662_google","bottom_left_lat":"37.37684903907629","top_right_lng":"-481.9218884671765","zoom":"21","floor_number":"1","bottom_left_lng":"-481.92289168845116"}
[info] application - LPLogger::Info:: Floorplan Request[floorplan]: blob

Did some one resolve this issue?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests