ngerstle / cloudpebble-vagrantfile

Here's a vagrantfile that sets up a local/selfhosted cloudpebble.
2 stars 0 forks source link

Images are not being shown when a GitHub project is cloned #1

Open ltpitt opened 6 years ago

ltpitt commented 6 years ago

Hi there!

I just have two bugs I am having a hard time squashing, I was wondering if you were able to solve the riddles.

One is this: In CloudPebble local instance choose New Project and clone it from github, for example: https://github.com/ltpitt/javascript-pebble-homeassistant.git

The cloned project will not have images in resources.

I've been searching in the local filesystem but I couldn't find the cloned project folder at all :/

Clearly close this / ignore if you have no time.

ngerstle commented 6 years ago

I'll try to see if I can figure out if the images are getting cloned anywhere in the box this weekend.

ngerstle commented 6 years ago

@ltpitt go ahead and open the other issue if you feel like it- it might be a quick fix. I can respond to that one separately.

ngerstle commented 6 years ago

Just doing some quick searches for git in the repositories cloned in vagrant, I can actually find results in the cloudpebble repo, so that might be a starting point in figuring out where things are going wrong. https://github.com/pebble/cloudpebble/search?q=git&type=Code&utf8=%E2%9C%93

ngerstle commented 6 years ago

@ltpitt Is there a possibility you could download the repo as a zip, then import it and see if the images are there? It might help limit the images issue to the git import functionality, vs the source repo or handling images in general.

ngerstle commented 6 years ago

References to the resources and files seem to be stored in the postgres database. I'm not sure if the actual source code and resources are in the database as well: vagrant ssh sudo docker ps sudo docker run -it --rm --link a11f9c0814a7:postgres postgres psql -h postgres -U postgres (where a11f9c0814a7 is the id of the container running postgres from the docker ps output)

postgres=# \dt
                     List of relations
 Schema |               Name               | Type  |  Owner   
--------+----------------------------------+-------+----------
 public | auth_group                       | table | postgres
 public | auth_group_permissions           | table | postgres
 public | auth_permission                  | table | postgres
 public | auth_user                        | table | postgres
 public | auth_user_groups                 | table | postgres
 public | auth_user_user_permissions       | table | postgres
 public | celery_taskmeta                  | table | postgres
 public | celery_tasksetmeta               | table | postgres
 public | django_content_type              | table | postgres
 public | django_session                   | table | postgres
 public | django_site                      | table | postgres
 public | djcelery_crontabschedule         | table | postgres
 public | djcelery_intervalschedule        | table | postgres
 public | djcelery_periodictask            | table | postgres
 public | djcelery_periodictasks           | table | postgres
 public | djcelery_taskstate               | table | postgres
 public | djcelery_workerstate             | table | postgres
 public | ide_buildresult                  | table | postgres
 public | ide_buildsize                    | table | postgres
 public | ide_dependency                   | table | postgres
 public | ide_project                      | table | postgres
 public | ide_project_project_dependencies | table | postgres
 public | ide_resourcefile                 | table | postgres
 public | ide_resourceidentifier           | table | postgres
 public | ide_resourcevariant              | table | postgres
 public | ide_sourcefile                   | table | postgres
 public | ide_templateproject              | table | postgres
 public | ide_usergithub                   | table | postgres
 public | ide_usersettings                 | table | postgres
 public | registration_registrationprofile | table | postgres
 public | social_auth_association          | table | postgres
 public | social_auth_code                 | table | postgres
 public | social_auth_nonce                | table | postgres
 public | social_auth_usersocialauth       | table | postgres
 public | south_migrationhistory           | table | postgres
(35 rows)

postgres=# select * from ide_resourcefile;
 id | project_id |         file_name          | kind | is_menu_icon 
----+------------+----------------------------+------+--------------
 17 |          3 | app_icon.png               | png  | t
 18 |          3 | lightbulb_black_icon.png   | png  | f
 19 |          3 | lightbulb_white_icon.png   | png  | f
 20 |          3 | microphone_black_icon.png  | png  | f
 21 |          3 | microphone_white_icon.png  | png  | f
 22 |          3 | splash.png                 | png  | f
 23 |          3 | thermometer_black_icon.png | png  | f
 24 |          3 | thermometer_white_icon.png | png  | f
(8 rows)

Will investigate further, later.

ltpitt commented 6 years ago

Amazing progression!

I can also try and clone the project manually or download as a zip file as you suggested but I can't understand where to place the files.

If I understand your last finding well it seems like everything is stored into the DB...

ltpitt commented 6 years ago

I have reports from people being able to use everything perfectly :O That is strange indeed...

Seems like it might be related to their VM network configured in bridge mode.

I will investigate and report.