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

Favorites not showing on maps #307

Closed
RadoslawDryzner opened this issue Feb 21, 2020 · 17 comments
Closed

Favorites not showing on maps #307

RadoslawDryzner opened this issue Feb 21, 2020 · 17 comments

Comments

@RadoslawDryzner
Copy link

Hello,

I have noticed a bug in the latest version when running the maps app within Nextcloud. Simply said, the favorites added on the map do not show on the map. If you inspect the responses to requests done by the browser, you can see the favorites are actually returned with their ID and coordinates, but simply do not appear on the map. The favorites icon on the left is always set to "loading".

The setup I am running is the following. It should be very easy to reproduce.

  • I am running latest Nextcloud image from docker. I believe the Nextcloud version there is 18.0.1.
  • It happens from a completely fresh install using either SQLite or PostgreSQL databases.
  • I install Maps from the App Store. It is on version 0.1.5 I think.
  • I am using the latest version of Firefox on Linux to access the interface.

Steps to reproduce:

  1. Pull nextcloud image from docker hub.
    docker pull nextcloud
  2. Run the docker image in a new container.
    docker run -d -p 8080:80 nextcloud
  3. Go with the first run setup choosing SQLite.
  4. Access Nextcloud on localhost:8080
  5. Install Maps with the app managment tool within Nextcloud.
  6. Open Maps app.
  7. Add a favorite.

The whole setup shouldn't take longer than 5 minutes to reproduce.

I am quite new in Netxcloud so I am not familiar with which logs could be relevant here. If you tell me which ones are important, I am happy to provide them.

@r3pek
Copy link

r3pek commented Feb 21, 2020

Same as #305

@doc75
Copy link
Contributor

doc75 commented Feb 21, 2020

@r3pek, as stated in #305 I was not able to validate the fix. Not sure if this is a mistake in my test procedure or not.

@RadoslawDryzner
Copy link
Author

Sorry I wasn't aware of the other issue. How quick do changes on master usually move into release here?

@Bergum
Copy link

Bergum commented Feb 21, 2020

After updating to 0.1.5 i have only:
My favorites are just spinning,
One picture on map.
No tracks are loading (Just spinning) (but are visible in right menu, but all hidden/displayed and color are reset to default. Cant get them on the map.

Tracks where working before the update.

NK Version 18.01 upgraded from 18.0
Maps Ver 0.1.5

Have done:
./occ maps:scan-photos
./occ maps:scan-tracks

@julien-nc
Copy link
Member

@Bergum @RadoslawDryzner @r3pek Could you check the browser console error log and show complete error lines?

I'm quite surprised the fix does not work. Let's find out and fix it!

@Bergum
Copy link

Bergum commented Feb 21, 2020

Could you check the browser console error log and show complete error lines?

How do that?

@julien-nc
Copy link
Member

In Firefox and Chromium: press F12 (or equivalent 😉) and go to "console" tab. Then reload the page and look for red lines mentioning errors.

@Bergum
Copy link

Bergum commented Feb 21, 2020

@eneiluj

VM650:1 Uncaught SyntaxError: Unexpected token , in JSON at position 413
at JSON.parse ()
at Function.m.parseJSON (jquery.js:7522)
at Function.e.parseJSON (jquery-migrate.min.js:2)
at S.addTrackMap (tracksController.js:292)
at Object. (tracksController.js:420)
at c (jquery.js:3099)
at Object.fireWith [as resolveWith] (jquery.js:3211)
at k (jquery.js:8264)
at XMLHttpRequest. (jquery.js:8605)
m.parseJSON @ jquery.js:7522
e.parseJSON @ jquery-migrate.min.js:2
addTrackMap @ tracksController.js:292
(anonymous) @ tracksController.js:420
c @ jquery.js:3099
fireWith @ jquery.js:3211
k @ jquery.js:8264
(anonymous) @ jquery.js:8605
load (async)
send @ jquery.js:8622
ajax @ jquery.js:8166
getTracks @ tracksController.js:408
toggleTracks @ tracksController.js:151
(anonymous) @ tracksController.js:82
dispatch @ jquery.js:4435
_.handle @ jquery.js:4121
favoritesController.js:730 Uncaught ReferenceError: cat is not defined
at Q.addFavoriteMap (favoritesController.js:730)
at Object. (favoritesController.js:427)
at c (jquery.js:3099)
at Object.fireWith [as resolveWith] (jquery.js:3211)
at k (jquery.js:8264)
at XMLHttpRequest. (jquery.js:8605)

@Bergum
Copy link

Bergum commented Feb 21, 2020

Like this 3 ones?

favoritesController.js:730 Uncaught ReferenceError: cat is not defined
at Q.addFavoriteMap (favoritesController.js:730)
at Object. (favoritesController.js:427)
at c (jquery.js:3099)
at Object.fireWith [as resolveWith] (jquery.js:3211)
at k (jquery.js:8264)
at XMLHttpRequest. (jquery.js:8605)

@doc75
Copy link
Contributor

doc75 commented Feb 21, 2020

@Bergum, seems to be the same issue than the one fixed in #306. If you take code from the master, you should see a similar error on line 538 with catName, that I just fixed with #308

@Bergum
Copy link

Bergum commented Feb 21, 2020

@doc75 Great. So you will release a fix soon?

@doc75
Copy link
Contributor

doc75 commented Feb 21, 2020

@Bergum I cannot say as I am not a maintainer of this repo (this is my first contribution to maps ;-) )

@Bergum
Copy link

Bergum commented Feb 22, 2020

@doc75 @eneiluj

After adding var as suggested, i still have error in bouth your favorites

favoritesController.js:730 Uncaught ReferenceError: cat is not defined
at Q.addFavoriteMap (favoritesController.js:730)
at Object. (favoritesController.js:427)
at c (jquery.js:3099)
at Object.fireWith [as resolveWith] (jquery.js:3211)
at k (jquery.js:8264)
at XMLHttpRequest. (jquery.js:8605)

and in Your tracks:

VM897:1 Uncaught SyntaxError: Unexpected token , in JSON at position 413
at JSON.parse ()
at Function.m.parseJSON (jquery.js:7522)
at Function.e.parseJSON (jquery-migrate.min.js:2)
at S.addTrackMap (tracksController.js:292)
at Object. (tracksController.js:420)
at c (jquery.js:3099)
at Object.fireWith [as resolveWith] (jquery.js:3211)
at k (jquery.js:8264)
at XMLHttpRequest. (jquery.js:8605)

@gioulisapo
Copy link

Hello same issue, FYI I also just tried with the git version, same results. I get the following messages in Console:

Content Security Policy: The page’s settings blocked the loading of a resource at eval (“script-src”). getInferredName.js:6:19

moment is deprecated: please ship your own, this will be removed in Nextcloud 20 5 globals.js:66:15

ReferenceError: assignment to undeclared variable cat
favoritesController.js:730:12
    addFavoriteMap favoritesController.js:730
    getFavorites favoritesController.js:427
    jQuery 4
        c
        fireWith
        k
        t

The humanFileSize library is deprecated! It will be removed in nextcloud 19. 8 globals.js:66:15

ReferenceError: assignment to undeclared variable catfavoritesController.js:730:12
    addFavoriteMap favoritesController.js:730
    getFavorites favoritesController.js:427
    jQuery 4

@doc75
Copy link
Contributor

doc75 commented Feb 22, 2020

@Bergum, I do not know how you did to test it with the detailed file. On my side I followed the step I mentioned in #305 and ends up with a file named script.js.

Do not forget to clean your cache also before re-testing with the fix.

julien-nc pushed a commit that referenced this issue Feb 22, 2020
Signed-off-by: Julien Veyssier <[email protected]>
@julien-nc julien-nc added this to the 0.1.6 🔧 fix² milestone Feb 22, 2020
@doc75
Copy link
Contributor

doc75 commented Mar 12, 2020

@Bergum, @RadoslawDryzner, @gioulisapo: Now that v0.1.6 is released you might give it a try to see if it is solving your issue (#305 is fixed in v0.1.6).

@meichthys
Copy link

I think this issue is fixed, although the favorite star icons are transparent now (I've filed a separate bug for this #866)
image

@tacruc tacruc closed this as completed Mar 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

8 participants