From: Craig B. <cra...@ma...> - 2021-07-02 20:38:12
|
> On Jul 2, 2021, at 3:13 PM, Joe Wicentowski <jo...@GM...> wrote: > > Hi Craig, > > The problem with the snippet I provided was that it returned a string instead. I'm actually not sure how it worked for Christian. > > Instead, please try this one - copied from the PR where Juri and I have been working on a fix https://github.com/eXist-db/existdb-packageservice/pull/22: > > try { > repo:get-resource($app, $name) > => util:binary-to-string() > => parse-xml() > } catch * { > document { > <meta xmlns="http://exist-db.org/xquery/repo"> > <description>Invalid repo descriptor for app {$app}</description> > </meta> > } > } > > When the Dashboard Launcher tries to load an app's metadata and it fails this try-catch expression, the result in the Dashboard UI will be that the app does not appear in the listing of apps. Since this is a silent failure, I plan to add a log entry to exist.log indicating which app failed the check. > > I tried that. If I do that I get this exception: <exception> <path>/db/apps/packageservice/modules/local-apps.xql</path> <message> err:XPTY0004 document-node()( eXist-db HTML Templating Library http://exist-db.org/xquery/html-templating templates.xqm http://exist-db.org/xquery/html-templating/lib lib.xqm ) is not a sub-type of element() [at line 264, column 43, source: /db/apps/packageservice/modules/packages.xqm] In function: packages:get-package-meta(xs:string, xs:string) [257:24:/db/apps/packageservice/modules/packages.xqm] packages:scan-repo(function(*)) [147:5:/db/apps/packageservice/modules/packages.xqm] packages:installed-apps(xs:string) [118:19:/db/apps/packageservice/modules/packages.xqm] packages:get-local(xs:string) [38:5:/db/apps/packageservice/modules/packages.xqm] packages:get-local-applications() [16:6:/db/apps/packageservice/modules/packages.xqm] </message> </exception> If I also remove the "as element(repo:meta)" return type from the function, I'm back to the "Resource icon.png does not exist" error. > > On Thu, Jul 1, 2021 at 7:29 PM Craig Berry <cra...@ma...> wrote: > > > > On Jul 1, 2021, at 4:58 PM, Joe Wicentowski <jo...@gm...> wrote: > > > > Hi Craig, > > > > Thanks for reporting your experience. We're tracking the Apple installation experience issues at https://github.com/eXist-db/exist/issues/3961. > > Thanks, I was reading that when your message came in. > > > > > Several people have reported experiencing an issue where Dashboard doesn't open after upgrading eXist unless you clear your cookies. (For me, clearing the JSESSIONID cookie worked; I do this in Chrome by navigating to Dashboard, opening View > Developer > Developer Tools > Application > Cookies > http://localhost:8080, selecting the JSESSIONID cookie, and hitting the delete key or using right-click > Delete.) > > > > I don't think that's your issue, but I mentioned it just in case you do see it (it has returned for some people who access multiple versions of Dashboard in the same browser). > > > > In Slack, Christian Wittern reported an issue similar to yours. It turned out to be caused by a custom package missing a repo.xml resource, a condition that triggered a bug in the packageservice app. What allowed Christian to overcome the problem was by modifying the packages:get-package-meta() function in /db/apps/packageservice/modules/packages.xqm module, lines 269-274, to read: > > > > try { > > let $meta := repo:get-resource($app, $name) > > return util:binary-to-string($meta) > > } catch * { > > util:log("warn", ("Could not get metadata for: ", $app, $name)) > > } > > > > Christian reported that this fixed the issue, and in Juri said he plans to submit a PR with this fix. > > I tried that and the exception changed to: > > <exception> > <path>/db/apps/packageservice/modules/local-apps.xql</path> > <message>exerr:ERROR cannot convert xs:string('<?xml version="1.0" encoding="UTF-8"?> > <meta xmlns="http://exist-db.org/xquery/repo"> > <description>This package contains the HTML templating library for eXist, which was previously part of the now deprecated 'shared-resources'</description> > <author>eXist-db Project</author> > <website>https://github.com/eXist-db/templating</website> > <status>stable</status> > <license>LGPL-2.1</license> > <copyright>true</copyright> > <type>library</type> > <deployed>2021-06-29T13:30:35.133-05:00</deployed> > </meta>') to a node set [at line 149, column 27, source: /db/apps/packageservice/modules/packages.xqm] > In function: > (item()*, item()*, item()*) [148:18:/db/apps/packageservice/modules/packages.xqm] > packages:scan-repo(function(*)) [147:5:/db/apps/packageservice/modules/packages.xqm] > packages:installed-apps(xs:string) [118:19:/db/apps/packageservice/modules/packages.xqm] > packages:get-local(xs:string) [38:5:/db/apps/packageservice/modules/packages.xqm] > packages:get-local-applications() [16:6:/db/apps/packageservice/modules/packages.xqm]</message> > </exception> > > As far as I can see, that doesn't tell me what, exactly, is using HTML templating / shared-resources. Is there any guide related to migrating to the new way of doing templating or is all of that supposed to be API-compatible? > > > > > > Until a new version of packageservice is available, hopefully this workaround will get you back up and running. You might also examine your packages to look for a missing repo.xml file or possibly even other package metadata files (e.g., expath-pkg.xml). > > I don't see any missing repo.xml or expath-pkg.xml files. > > > > > Joe > > > > On Thu, Jul 1, 2021 at 5:19 PM Craig Berry via Exist-open <exi...@li...> wrote: > > > > > > > On Jun 26, 2021, at 1:04 PM, Juri Leino <ju...@ex...> wrote: > > > > > > We are very happy to announce that eXist-db 5.3.0 has been released. > > > > > > It's been quite a while since the last release. A lot has been happening behind the scenes, and we are happy to share the outcome with you. 5.3.0 is a minor release, and should be 100% API compatible with 5.0.0 as such. > > > > > > > Thanks for all the hard work. I have run into some issues getting this working and I'm reporting here rather than GitHub as it's unclear to me whether the problems are in eXist, one of the new or revised packages, or pilot error of some sort. > > > > I installed the DMG image on macOS 11.4, keeping an existing data directory that's been running fine with 5.2.0. I did have to ignore a warning about not being able to verify the identity of the publisher, which I assume has something to do with not paying Apple to countersign the code signing cert or something. That was readily ignorable, if initially alarming. I bumped up some memory settings during the first start-up but otherwise accepted the defaults. > > > > When I open the Dashboard from the menu bar and logged in, I didn't get any application icons. I clicked on Package Manager in the left side menu and got a "loading of available packages failed" message. At this point the browser console shows a 404 error at this URL: > > > > http://localhost:8080/exist/apps/dashboard/bower_components/web-animations-js/web-animations-next-lite.min.js.map > > > > and a 400 error at this URL: > > > > http://localhost:8080/exist/apps/packageservice/packages/apps > > > > the details of which look like this: > > > > <?xml version="1.0" ?> > > <exception> > > <path>/db/apps/packageservice/modules/local-apps.xql</path> > > <message>err:FODC0002 Resource icon.png does not exist. [at line 148, column 18, source: /db/apps/packageservice/modules/packages.xqm] > > In function: > > (item()*, item()*, item()*) [148:18:/db/apps/packageservice/modules/packages.xqm] > > packages:scan-repo(function(*)) [147:5:/db/apps/packageservice/modules/packages.xqm] > > packages:installed-apps(xs:string) [118:19:/db/apps/packageservice/modules/packages.xqm] > > packages:get-local(xs:string) [38:5:/db/apps/packageservice/modules/packages.xqm] > > packages:get-local-applications() [16:6:/db/apps/packageservice/modules/packages.xqm]</message> > > </exception> > > > > There is an icon.png at /db/apps/packageservice/icon.png, so I'm not sure what it's confused about. In /db/apps/packageservice/expath-pkg.xml, it says the version I have is 1.3.9 -- is that the right one? > > > > eXide seems to be working fine. I tried running the following in eXide, which had no effect: > > > > import module namespace repair="http://exist-db.org/xquery/repo/repair" > > at "resource:org/exist/xquery/modules/expathrepo/repair.xql"; > > > > repair:clean-all(), > > repair:repair() > > > > Any other ideas? > > > > > > > > ________________________________________ > > Craig A. Berry > > > > "... getting out of a sonnet is much more > > difficult than getting in." > > Brad Leithauser > > > > > > > > _______________________________________________ > > Exist-open mailing list > > Exi...@li... > > https://lists.sourceforge.net/lists/listinfo/exist-open > > ________________________________________ > Craig A. Berry > > "... getting out of a sonnet is much more > difficult than getting in." > Brad Leithauser > ________________________________________ Craig A. Berry "... getting out of a sonnet is much more difficult than getting in." Brad Leithauser |