Opened 6 years ago

Closed 6 years ago

Last modified 4 years ago

#13832 closed bug (fixed)

HaikuDepot: Commenting broken

Reported by: humdinger Owned by: stippi
Priority: normal Milestone: R1/beta2
Component: Applications/HaikuDepot Version: R1/Development
Keywords: Cc:
Blocked By: Blocking:
Platform: All

Description

This is hrev51651.

When installing an application, the "Repository" column changes from e.g. HaikuPorts to "system". Is that correct? The package is moved into /system/packages/ when it's installed, but technically its repository is still HaikuPorts, no?

Anyway, trying to send a comment results - when started from Terminal - in the output of "unable to find the web app repository code for the local depot system" .

[BTW, every entered letter prints lots of stuff to the Terminal...]

Attachments (2)

LBreakout_rating-nope.png (7.3 KB ) - added by humdinger 6 years ago.
when clicking the "Rating" button
LBreakout_log.txt (3.5 KB ) - added by humdinger 6 years ago.

Download all attachments as: .zip

Change History (21)

comment:1 by apl-haiku, 6 years ago

Hello humdinger; there have been some changes around user commenting in recent weeks. Can you please check this issue again and check to see if the problem is still there.

comment:2 by humdinger, 6 years ago

I now get a different error message. An alert pops up to inform: An unexpected error has been sent from the HaikuDepot server [-32700]

The Terminal says:

there was no previous rating for this user on this version of this package so a new rating will be added.
will create a new user rating for pkg [lbreakout2]

comment:3 by apl-haiku, 6 years ago

Hello humdinger; I see the following around this time in the HDS Log;

java.lang.IllegalStateException: it is not possible to create a user rating with no meaningful rating data
        at org.haiku.haikudepotserver.api1.UserRatingApiImpl.createUserRating(UserRatingApiImpl.java:248)

To achieve this the following has to all be true;

  • no comment
  • no stability code
  • no rating value

I'm a bit confused so would you mind running it from the Terminal with...

./HaikuDepot -v trace

...and see if there is any evidence in the logs at your end?

comment:4 by humdinger, 6 years ago

This is the output when sending off my comment (incl. rating, stablility, language, comment):

will make json-rpc request to [https://depot.haiku-os.org/__api/v1/userrating]
jrpc: Resolving https://depot.haiku-os.org/__api/v1/userrating
jrpc: Hostname resolved to: 78.46.189.219:443
jrpc: Connection to depot.haiku-os.org on port 443.
jrpc: Connection opened, sending request.
jrpc: Host: depot.haiku-os.org
jrpc: Accept: */*
jrpc: Accept-Encoding: gzip
jrpc: Connection: close
jrpc: User-Agent: HaikuDepot/0.0.2
jrpc: Content-Length: 290
jrpc: Content-Type: application/json
jrpc: Request sent.
jrpc: Status line received: Code 200 (OK)
jrpc: Date: Thu, 28 Jun 2018 16:51:46 GMT
jrpc: Server: Jetty(9.3.15.v20161220)
jrpc: Content-Type: application/json
jrpc: Vary: Accept-Encoding
jrpc: Content-Encoding: gzip
jrpc: Content-Length: 128
jrpc: Connection: close
jrpc: 7 headers and 0 bytes of data remaining
did receive json-rpc response http status [200] from [https://depot.haiku-os.org/__api/v1/userrating]
there was no previous rating for this user on this version of this package so a new rating will be added.
will create a new user rating for pkg [lbreakout2]
will make json-rpc request to [https://depot.haiku-os.org/__api/v1/userrating]
jrpc: Resolving https://depot.haiku-os.org/__api/v1/userrating
jrpc: Hostname resolved to: 78.46.189.219:443
jrpc: Connection to depot.haiku-os.org on port 443.
jrpc: Connection opened, sending request.
jrpc: Host: depot.haiku-os.org
jrpc: Accept: */*
jrpc: Accept-Encoding: gzip
jrpc: Connection: close
jrpc: User-Agent: HaikuDepot/0.0.2
jrpc: Authorization: Basic [redacted-by-humdinger]
jrpc: Content-Length: 494
jrpc: Content-Type: application/json
jrpc: Request sent.
jrpc: Status line received: Code 200 (OK)
jrpc: Date: Thu, 28 Jun 2018 16:52:47 GMT
jrpc: Server: Jetty(9.3.15.v20161220)
jrpc: Content-Type: application/json
jrpc: Vary: Accept-Encoding
jrpc: Content-Encoding: gzip
jrpc: Content-Length: 92
jrpc: Connection: close
jrpc: 7 headers and 0 bytes of data remaining
did receive json-rpc response http status [200] from [https://depot.haiku-os.org/__api/v1/userrating]

comment:5 by apl-haiku, 6 years ago

After commit cd417b96c94b the payload of the JSON-RPC communications should also be logged. Can you please repeat and also copy the payload into here so I can try to see what is going on. Thanks!

comment:6 by humdinger, 6 years ago

Tested with hrev52070, 32bit. Unfortunately I cannot even get to the rating window now. I get this alert:

when clicking the "Rating" button

I attach the log, if that's of any use.
BTW, I uninstalled and installed LBreakout again, just in case...

by humdinger, 6 years ago

Attachment: LBreakout_rating-nope.png added

when clicking the "Rating" button

by humdinger, 6 years ago

Attachment: LBreakout_log.txt added

comment:7 by apl-haiku, 6 years ago

Strange; it seems to be working OK for me. Another quite large change has gone through last week for repository-matching. Can you either try a fresh VM installation to get that log (mentioned above) or on your existing installation, can you first...

  1. update
  2. remove the HaikuPorts repository
  3. re-add the HaikuPorts repository
  4. observe the file at /system/settings/package-repositories/HaikuPorts contains a line cfgversion=2 as well as a url and baseurl parameter
  5. Delete the directory ~/config/cache/HaikuDepot

comment:8 by humdinger, 6 years ago

Did that. I see cfgversion=2 as well as a url and baseurl. I still see that seems-not-on-server alert, now with hrev52080.

I do see plenty of output pertaining to LBreakout2 with HaikuDepot -v trace:

found deskbar entry: data/deskbar/menu/Applications/LBreakout2 -> ../../../../bin/lbreakout2
pkg [lbreakout2] will be updated from the server.
jrpc; will make request to [https://depot.haiku-os.org/__api/v1/pkg]
jrpc request; {"jsonrpc":"2.0","id":1,"method":"getPkgChangelog","params":[{"pkgName":"lbreakout2"}]}
jrpc: Resolving https://depot.haiku-os.org/__api/v1/pkg
jrpc: Hostname resolved to: 78.46.189.219:443
jrpc: Connection to depot.haiku-os.org on port 443.
jrpc: Connection opened, sending request.
jrpc: Host: depot.haiku-os.org
jrpc: Accept: */*
jrpc: Accept-Encoding: gzip
jrpc: Connection: close
jrpc: User-Agent: HaikuDepot/0.0.2
jrpc: Content-Length: 87
jrpc: Content-Type: application/json
jrpc: Request sent.
jrpc: Status line received: Code 200 (OK)
jrpc: Date: Mon, 09 Jul 2018 16:20:13 GMT
jrpc: Server: Jetty(9.3.15.v20161220)
jrpc: Content-Type: application/json
jrpc: Vary: Accept-Encoding
jrpc: Content-Encoding: gzip
jrpc: Content-Length: 329
jrpc: Connection: close
jrpc: 7 headers and 0 bytes of data remaining
jrpc; did receive http-status [200] from [https://depot.haiku-os.org/__api/v1/pkg]
jrpc response; {"jsonrpc":"2.0","id":1,"result":{"content":"2.6.5:\n- in kids mode brick regeneration is four times slower (2015/10/17 MS)\n- in kids mode bonuses last four times longer (2015/10/17 MS)\n- division by zero crash fixed in server (2014/02/03 Colin Tuckley)\n- added danish translation (2013/07/29 Joe Dalton)\n- updated a number of levelsets from OFT (2013/03/20 MS)\n- use $docdir for document path in configure (2012/08/15 MS)\n- added a bunch of new levelsets, removed OldGames (2012/08/15 MS)"}}

changelog populated for [lbreakout2]
jrpc; will make request to [https://depot.haiku-os.org/__api/v1/userrating]
jrpc request; {"jsonrpc":"2.0","id":2,"method":"searchUserRatings","params":[{"pkgName":"lbreakout2","pkgVersionArchitectureCode":"x86_gcc2","offset":0,"limit":50}]}
jrpc: Resolving https://depot.haiku-os.org/__api/v1/userrating
jrpc: Hostname resolved to: 78.46.189.219:443
jrpc: Connection to depot.haiku-os.org on port 443.
jrpc: Connection opened, sending request.
jrpc: Host: depot.haiku-os.org
jrpc: Accept: */*
jrpc: Accept-Encoding: gzip
jrpc: Connection: close
jrpc: User-Agent: HaikuDepot/0.0.2
jrpc: Content-Length: 151
jrpc: Content-Type: application/json
jrpc: Request sent.
jrpc: Status line received: Code 200 (OK)
jrpc: Date: Mon, 09 Jul 2018 16:20:14 GMT
jrpc: Server: Jetty(9.3.15.v20161220)
jrpc: Content-Type: application/json
jrpc: Vary: Accept-Encoding
jrpc: Content-Encoding: gzip
jrpc: Content-Length: 489
jrpc: Connection: close
jrpc: 7 headers and 0 bytes of data remaining
jrpc; did receive http-status [200] from [https://depot.haiku-os.org/__api/v1/userrating]
jrpc response; {"jsonrpc":"2.0","id":2,"result":{"items":[{"code":"278fcc99-5c72-428a-812e-ded1cd0d04a9","naturalLanguageCode":"de","user":{"nickname":"lelldorin"},"userRatingStabilityCode":"stable","active":true,"comment":"One of many games by Michael Spreck (http://lgames.sourceforge.net) available for Haiku. In Arcanoid marnier, you have to smash the pieces with a ball. Various additional events never make this game boring. The game is also Themeable.","modifyTimestamp":1489347572187,"createTimestamp":1451938197751,"rating":5,"pkgVersion":{"repositoryCode":"haikuports","architectureCode":"x86_gcc2","major":"2","minor":"6","micro":"4","preRelease":null,"revision":2,"pkg":{"name":"lbreakout2"}}}],"total":1}}

rating [278fcc99-5c72-428a-812e-ded1cd0d04a9] retrieved from server
did retrieve 1 user ratings for [lbreakout2]
jrpc: Resolving https://depot.haiku-os.org/__pkgscreenshot/d3548894-e663-4e8f-b644-a67aa77e599a.png?tw=320&th=251
jrpc: Hostname resolved to: 78.46.189.219:443
jrpc: Connection to depot.haiku-os.org on port 443.
jrpc: Connection opened, sending request.
jrpc: Host: depot.haiku-os.org
jrpc: Accept: */*
jrpc: Accept-Encoding: gzip
jrpc: Connection: close
jrpc: User-Agent: HaikuDepot/0.0.2
jrpc: Request sent.
jrpc: Status line received: Code 200 (OK)
jrpc: Date: Mon, 09 Jul 2018 16:20:14 GMT
jrpc: Server: Jetty(9.3.15.v20161220)
jrpc: Content-Type: image/png
jrpc: Cache-Control: max-age=3600
jrpc: Last-Modified: Sat, 11 Feb 2017 22:39:00 GMT
jrpc: Connection: close
jrpc: Transfer-Encoding: chunked
jrpc: 7 headers and 0 bytes of data remaining
jrpc: Resolving https://depot.haiku-os.org/__pkgscreenshot/b246777d-0985-4719-8ccb-38621fcbd101.png?tw=320&th=251
jrpc: Hostname resolved to: 78.46.189.219:443
jrpc: Connection to depot.haiku-os.org on port 443.
jrpc: Connection opened, sending request.
jrpc: Host: depot.haiku-os.org
jrpc: Accept: */*
jrpc: Accept-Encoding: gzip
jrpc: Connection: close
jrpc: User-Agent: HaikuDepot/0.0.2
jrpc: Request sent.
jrpc: Status line received: Code 200 (OK)
jrpc: Date: Mon, 09 Jul 2018 16:20:14 GMT
jrpc: Server: Jetty(9.3.15.v20161220)
jrpc: Content-Type: image/png
jrpc: Cache-Control: max-age=3600
jrpc: Last-Modified: Sat, 11 Feb 2017 22:39:00 GMT
jrpc: Connection: close
jrpc: Transfer-Encoding: chunked
jrpc: 7 headers and 0 bytes of data remaining
populating package [lbreakout2]

comment:9 by apl-haiku, 6 years ago

I have just...

  • updated my source to master + (my patch in review)
  • built ISO for x86_gcc2
  • installed clean
  • pkgman refresh
  • loaded HDS and logged in
  • searched for "breakout"
  • clicked on the entry in the list view
  • clicked on the stars in the detail view

I did not see the "This package does not seem to be..." error message. Once my patch is merged fixing #14284, would you please also try this in order to try to identify where the problem lies.

comment:10 by humdinger, 6 years ago

Good news: after updating and deleting all caches and settings, I don't get that "This package does not seem to be..." error message anymore either.

Bad news: When trying to send my rating+comment, I got an alert: "An unexpected error has been sent from the HaikuDepot server [-32700]".
I restarted HaikuDepot from Terminal this time with "-v trace". Clicking the "Rating" button now pops up an alert: "A network transport error has arisen communicating with the HaikuDepot server system: Data read partially. The Terminal output:

jrpc; will make request to [https://depot.haiku-os.org/__api/v1/userrating]
an error has arisen communicating with the server to obtain data for an existing rating [Data read partially]

Am I the only one unable to rate/comment a package? Strange...

comment:11 by apl-haiku, 6 years ago

Hello Humdinger -- there is a known issue #14554 with rating installed packages that is going through peer review, but in the meantime, can you please check the creation and updating of ratings after revision 58812.

comment:12 by humdinger, 6 years ago

Seems to be fixed. Thanks\\ At least when sending my initial rating/comment. When I rate again, to edit my comment, I get this upon sending and an alert "An unexpected error has been sent from the HaikuDepot server [-32700]":

will update the existing user rating [9540b855-3c43-4943-b618-1719e8792017]
jrpc; will make request to [https://depot.haiku-os.org/__api/v1/userrating]
jrpc request; {"jsonrpc":"2.0","id":4,"method":"updateUserRating","params":[{"code":"9540b855-3c43-4943-b618-1719e8792017","naturalLanguageCode":"en","active":true,"filter":["ACTIVE","NATURALLANGUAGE","USERRATINGSTABILITY","COMMENT","RATING"],"rating":5,"userRatingStabilityCode":"stable","comment":"Very nice breakout game. I'm reminded of Amiga's Crystal Hammer that I played to exhaustion back then...\n\nTip: Hold the "C" key to speed up the ball to make the most of those bonuses!"}]}
jrpc: Resolving https://depot.haiku-os.org/__api/v1/userrating
jrpc: Hostname resolved to: 94.130.128.252:443
jrpc: Connection to depot.haiku-os.org on port 443.
jrpc: Connection opened, sending request.
jrpc: Host: depot.haiku-os.org
jrpc: Accept: */*
jrpc: Accept-Encoding: gzip
jrpc: Connection: close
jrpc: User-Agent: HaikuDepot/0.0.2
jrpc: Authorization: Basic aHVtZGluZ2VyOi9uZFplY25zT0UxMDE=
jrpc: Content-Length: 475
jrpc: Content-Type: application/json
jrpc: Request sent.
jrpc: Status line received: Code 200 (OK)
jrpc: Content-Length: 83
jrpc: Content-Type: application/json
jrpc: Date: Fri, 05 Oct 2018 18:15:11 GMT
jrpc: Server: Jetty(9.4.11.v20180605)
jrpc: Connection: close
jrpc: 5 headers and 0 bytes of data remaining
jrpc; did receive http-status [200] from [https://depot.haiku-os.org/__api/v1/userrating]
jrpc response; {"jsonrpc":"2.0","id":"null","error":{"code":-32700,"message":"JSON parse error"}}

comment:13 by humdinger, 6 years ago

Changing the number of rating stars does work, btw.

comment:14 by waddlesplash, 6 years ago

Relevant change merged in hrev52392.

comment:15 by apl-haiku, 6 years ago

Hi Humdinger; can you please check this one again. Thank you!

comment:16 by humdinger, 6 years ago

My nighlty install seems to be stuck at hrev52379...

Repo URLs seem to be correct:

~/Desktop :) $ pkgman list
        Haiku
                base-url:  https://eu.hpkg.haiku-os.org/haiku/master/x86_gcc2/current
                url:       https://hpkg.haiku-os.org/haiku/master/x86_gcc2/current
                priority:  1
        HaikuPorts
                base-url:  https://eu.hpkg.haiku-os.org/haikuports/master/x86_gcc2/current
                url:       https://hpkg.haiku-os.org/haikuports/master/x86_gcc2/current
                priority:  1

comment:17 by humdinger, 6 years ago

I've now tested with hrev52295+100 and it seems to work fine. I found another rating related issue that I'll add a new ticket for.

comment:18 by apl-haiku, 6 years ago

Resolution: fixed
Status: newclosed

comment:19 by nielx, 4 years ago

Milestone: UnscheduledR1/beta2

Assign tickets with status=closed and resolution=fixed within the R1/beta2 development window to the R1/beta2 Milestone

Note: See TracTickets for help on using tickets.