Originally created by @MarkSRobinson on GitHub (Apr 15, 2024).
Command:
pkl project package
Version:
Pkl 0.25.3 (Linux 5.15.0-1053-aws, native)
PklPackage: PklProject.txt
(I had to rename it because of Github file filters)
Error:
An unexpected error has occurred. Would you mind filing a bug report?
org.pkl.core.packages.PackageLoadError: Received unexpected status code `500` when making request `GET https://example.com/chart@1.0.0`.
at org.pkl.core.packages.PackageResolvers$AbstractPackageResolver.openExternalUri(PackageResolvers.java:208)
at org.pkl.core.packages.PackageResolvers$AbstractPackageResolver.getDependencyMetadataAndComputeChecksum(PackageResolvers.java:103)
at org.pkl.core.project.ProjectPackager.checkAlreadyPublishedPackage(ProjectPackager.java:175)
at org.pkl.core.project.ProjectPackager.doPackage(ProjectPackager.java:162)
at org.pkl.core.project.ProjectPackager.createPackages(ProjectPackager.java:122)
at org.pkl.cli.CliProjectPackager.doRun(CliProjectPackager.kt:88)
at org.pkl.commons.cli.CliCommand.run(CliCommand.kt:45)
at org.pkl.cli.commands.ProjectCommand$Companion$PackageCommand.run(ProjectCommand.kt:145)
at com.github.ajalt.clikt.parsers.Parser.parse(Parser.kt:198)
at com.github.ajalt.clikt.parsers.Parser.parse(Parser.kt:211)
at com.github.ajalt.clikt.parsers.Parser.parse(Parser.kt:211)
at com.github.ajalt.clikt.parsers.Parser.parse(Parser.kt:18)
at com.github.ajalt.clikt.core.CliktCommand.parse(CliktCommand.kt:400)
at com.github.ajalt.clikt.core.CliktCommand.parse$default(CliktCommand.kt:397)
[PklProject.txt](https://github.com/apple/pkl/files/14983660/PklProject.txt)
at com.github.ajalt.clikt.core.CliktCommand.main(CliktCommand.kt:415)
at com.github.ajalt.clikt.core.CliktCommand.main(CliktCommand.kt:440)
at org.pkl.cli.Main$main$1.invoke(Main.kt:52)
at org.pkl.cli.Main$main$1.invoke(Main.kt:40)
at org.pkl.commons.cli.CliMainKt.cliMain(CliMain.kt:31)
at org.pkl.cli.Main.main(Main.kt:40)
Expected output:
Can't access https://example.com/chart@1.0.0 (HTTP GET 500)
Originally created by @MarkSRobinson on GitHub (Apr 15, 2024).
Command:
```
pkl project package
```
Version:
```
Pkl 0.25.3 (Linux 5.15.0-1053-aws, native)
```
PklPackage:
[PklProject.txt](https://github.com/apple/pkl/files/14983665/PklProject.txt)
(I had to rename it because of Github file filters)
Error:
```
An unexpected error has occurred. Would you mind filing a bug report?
org.pkl.core.packages.PackageLoadError: Received unexpected status code `500` when making request `GET https://example.com/chart@1.0.0`.
at org.pkl.core.packages.PackageResolvers$AbstractPackageResolver.openExternalUri(PackageResolvers.java:208)
at org.pkl.core.packages.PackageResolvers$AbstractPackageResolver.getDependencyMetadataAndComputeChecksum(PackageResolvers.java:103)
at org.pkl.core.project.ProjectPackager.checkAlreadyPublishedPackage(ProjectPackager.java:175)
at org.pkl.core.project.ProjectPackager.doPackage(ProjectPackager.java:162)
at org.pkl.core.project.ProjectPackager.createPackages(ProjectPackager.java:122)
at org.pkl.cli.CliProjectPackager.doRun(CliProjectPackager.kt:88)
at org.pkl.commons.cli.CliCommand.run(CliCommand.kt:45)
at org.pkl.cli.commands.ProjectCommand$Companion$PackageCommand.run(ProjectCommand.kt:145)
at com.github.ajalt.clikt.parsers.Parser.parse(Parser.kt:198)
at com.github.ajalt.clikt.parsers.Parser.parse(Parser.kt:211)
at com.github.ajalt.clikt.parsers.Parser.parse(Parser.kt:211)
at com.github.ajalt.clikt.parsers.Parser.parse(Parser.kt:18)
at com.github.ajalt.clikt.core.CliktCommand.parse(CliktCommand.kt:400)
at com.github.ajalt.clikt.core.CliktCommand.parse$default(CliktCommand.kt:397)
[PklProject.txt](https://github.com/apple/pkl/files/14983660/PklProject.txt)
at com.github.ajalt.clikt.core.CliktCommand.main(CliktCommand.kt:415)
at com.github.ajalt.clikt.core.CliktCommand.main(CliktCommand.kt:440)
at org.pkl.cli.Main$main$1.invoke(Main.kt:52)
at org.pkl.cli.Main$main$1.invoke(Main.kt:40)
at org.pkl.commons.cli.CliMainKt.cliMain(CliMain.kt:31)
at org.pkl.cli.Main.main(Main.kt:40)
```
Expected output:
```
Can't access https://example.com/chart@1.0.0 (HTTP GET 500)
```
adam
added the bug label 2025-12-30 01:21:30 +01:00
I’ve seen similar errors before. I think the root cause is that CliProjectPackager.doRun doesn’t handle exceptions thrown by ProjectPackager.createPackages.
@odenix commented on GitHub (Apr 15, 2024):
I’ve seen similar errors before. I think the root cause is that `CliProjectPackager.doRun` doesn’t handle exceptions thrown by `ProjectPackager.createPackages`.
In case someone is looking for a solution to build a package w/o triggering exception: pkl project package --skip-publish-check
@eli-l commented on GitHub (Apr 16, 2024):
In case someone is looking for a solution to build a package w/o triggering exception:
`pkl project package --skip-publish-check`
It certainly is a bug that the exception isn't handled, but the exception itself is correct, so I advise against --skip-publish-check. Pkl checks whether you're not publishing a package with an existing version number. Conflicting versions will give you a very bad time.
@holzensp commented on GitHub (Apr 16, 2024):
It certainly is a bug that the exception isn't handled, but the exception itself is correct, so I advise against `--skip-publish-check`. Pkl checks whether you're not publishing a package with an existing version number. Conflicting versions will give you a very bad time.
It certainly is a bug that the exception isn't handled, but the exception itself is correct, so I advise against --skip-publish-check. Pkl checks whether you're not publishing a package with an existing version number. Conflicting versions will give you a very bad time.
Thank you for highlighting it, however I found out it is the only way for now to actually build the package w/o valid URL if I am going to use it locally. I expect it uses packageZipUrl which could not be a local file/dir. Definitely not a production-level solution, but we need a way to make it work to learn & experiment.
@eli-l commented on GitHub (Apr 16, 2024):
> It certainly is a bug that the exception isn't handled, but the exception itself is correct, so I advise against `--skip-publish-check`. Pkl checks whether you're not publishing a package with an existing version number. Conflicting versions will give you a very bad time.
Thank you for highlighting it, however I found out it is the only way for now to actually build the package w/o valid URL if I am going to use it locally. I expect it uses `packageZipUrl` which could not be a local file/dir. Definitely not a production-level solution, but we need a way to make it work to learn & experiment.
however I found out it is the only way for now to actually build the package w/o valid URL if I am going to use it locally.
I just ran into this issue
✗ pkl project package
An unexpected error has occurred. Would you mind filing a bug report?
org.pkl.core.packages.PackageLoadError: Received unexpected status code `500` when making request `GET https://example.com/pkl-project@0.0.1`.
at org.pkl.core.packages.PackageResolvers$AbstractPackageResolver.openExternalUri(PackageResolvers.java:208)
at org.pkl.core.packages.PackageResolvers$AbstractPackageResolver.getDependencyMetadataAndComputeChecksum(PackageResolvers.java:103)
at org.pkl.core.project.ProjectPackager.checkAlreadyPublishedPackage(ProjectPackager.java:175)
at org.pkl.core.project.ProjectPackager.doPackage(ProjectPackager.java:162)
Even though the stack trace looks like everything failed the package files were still created in the ".out/" directory ie
@harryjackson commented on GitHub (Apr 24, 2024):
> however I found out it is the only way for now to actually build the package w/o valid URL if I am going to use it locally.
I just ran into this issue
```
✗ pkl project package
An unexpected error has occurred. Would you mind filing a bug report?
org.pkl.core.packages.PackageLoadError: Received unexpected status code `500` when making request `GET https://example.com/pkl-project@0.0.1`.
at org.pkl.core.packages.PackageResolvers$AbstractPackageResolver.openExternalUri(PackageResolvers.java:208)
at org.pkl.core.packages.PackageResolvers$AbstractPackageResolver.getDependencyMetadataAndComputeChecksum(PackageResolvers.java:103)
at org.pkl.core.project.ProjectPackager.checkAlreadyPublishedPackage(ProjectPackager.java:175)
at org.pkl.core.project.ProjectPackager.doPackage(ProjectPackager.java:162)
```
Even though the stack trace looks like everything failed the package files were still created in the ".out/" directory ie
```bash
✗ tree .out
.out
└── pkl-project@0.0.1
├── pkl-project@0.0.1
├── pkl-project@0.0.1.sha256
├── pkl-project@0.0.1.zip
└── pkl-project@0.0.1.zip.sha256
2 directories, 4 files
```
I let that review sit for a day; few tweaks, but certainly useful, @MarkSRobinson!
@harryjackson, is the zip 0 bytes? Is pkl-project@0.0.1 the only dependency?
@holzensp commented on GitHub (Apr 25, 2024):
I let that review sit for a day; few tweaks, but certainly useful, @MarkSRobinson!
@harryjackson, is the zip 0 bytes? Is `pkl-project@0.0.1` the only dependency?
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Originally created by @MarkSRobinson on GitHub (Apr 15, 2024).
Command:
Version:
PklPackage:
PklProject.txt
(I had to rename it because of Github file filters)
Error:
Expected output:
@odenix commented on GitHub (Apr 15, 2024):
I’ve seen similar errors before. I think the root cause is that
CliProjectPackager.doRundoesn’t handle exceptions thrown byProjectPackager.createPackages.@eli-l commented on GitHub (Apr 16, 2024):
In case someone is looking for a solution to build a package w/o triggering exception:
pkl project package --skip-publish-check@holzensp commented on GitHub (Apr 16, 2024):
It certainly is a bug that the exception isn't handled, but the exception itself is correct, so I advise against
--skip-publish-check. Pkl checks whether you're not publishing a package with an existing version number. Conflicting versions will give you a very bad time.@eli-l commented on GitHub (Apr 16, 2024):
Thank you for highlighting it, however I found out it is the only way for now to actually build the package w/o valid URL if I am going to use it locally. I expect it uses
packageZipUrlwhich could not be a local file/dir. Definitely not a production-level solution, but we need a way to make it work to learn & experiment.@MarkSRobinson commented on GitHub (Apr 22, 2024):
@holzensp I've written up a small fix that improves the error message
@harryjackson commented on GitHub (Apr 24, 2024):
I just ran into this issue
Even though the stack trace looks like everything failed the package files were still created in the ".out/" directory ie
@holzensp commented on GitHub (Apr 25, 2024):
I let that review sit for a day; few tweaks, but certainly useful, @MarkSRobinson!
@harryjackson, is the zip 0 bytes? Is
pkl-project@0.0.1the only dependency?