pd4d10 / unpub

Self-hosted private Dart Pub server for Enterprise
https://pub.dev/packages/unpub
MIT License
437 stars 137 forks source link

Failed to publish package using Melos #81

Open dangvinh opened 2 years ago

dangvinh commented 2 years ago

Hi, I'm using Melos to manage my packages in one mono-repo,

But, when I publish package to self-hosted (unpub), it's through error:

Reading pub registry for package information... SUCCESS
Unhandled exception:
FormatException: Unexpected character (at character 1)
<!DOCTYPE html>
^

#0      _ChunkedJsonParser.fail (dart:convert-patch/convert_patch.dart:1383:5)
#1      _ChunkedJsonParser.parseNumber (dart:convert-patch/convert_patch.dart:1250:9)
#2      _ChunkedJsonParser.parse (dart:convert-patch/convert_patch.dart:915:22)
#3      _parseJson (dart:convert-patch/convert_patch.dart:35:10)
#4      JsonDecoder.convert (dart:convert/json.dart:612:36)
#5      JsonCodec.decode (dart:convert/json.dart:216:41)
#6      Package.getPublishedVersions (package:melos/src/package.dart:770:15)
<asynchronous suspension>
#7      _PublishMixin._getLatestPublishedVersionForPackages.<anonymous closure> (package:melos/src/commands/publish.dart:109:24)
<asynchronous suspension>
#8      Pool.forEach.run (package:pool/pool.dart:183:19)
<asynchronous suspension>
#9      Pool.withResource (package:pool/pool.dart:127:14)
<asynchronous suspension>
#10     Future.wait.<anonymous closure> (dart:async/future.dart:521:21)
<asynchronous suspension>

I have researched, and it's seem as an Unpub bug. Note: it's related to this issue: https://github.com/invertase/melos/issues/307

talisk commented 2 years ago

It looks like the api <pub-server>/packages/<package-name>.json returned an invalid result. Could you paste the response body of the api? @dangvinh

pontus-andersson commented 1 year ago

@dangvinh any updates on this? We're investigating if it's possible to use unpub with melos atm. Let me know if we can help out with something.

ahmdaeyz commented 1 year ago

Hey @pontus-andersson, I'm also investigating the possibility of using unpub with melos, Were you able to do that without any issues?

pontus-andersson commented 1 year ago

Hey @pontus-andersson,

I'm also investigating the possibility of using unpub with melos, Were you able to do that without any issues?

Not yet, unfortunately.