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

[Question] Error: Cannot use origin without a scheme: /api/packages/versions/newUpload #86

Open
stormenergy91 opened this issue Aug 29, 2022 · 1 comment

Comments

@stormenergy91
Copy link

stormenergy91 commented Aug 29, 2022

Hi, I need to install unpub on my internal server with Ubuntu. This is the step I do to install it:

  • On a dev machine clone this git repo and create an executible (fixing th String error): dart compile exe unpub/bin/unpub
  • Install this executile in my server and create a systemd configuration file with this command /path/to/unpub --database mongodb://localhost:27017/dart_pub --proxy-origin pub.mydomain.com
  • Create the folder unpub-packages in the same directory of the executible
  • Set folder premision to user www-data (the same that lanch unpub)
  • Create a nginx configuration for reverse proxy.

Unpub start succesfuly and i can see the homepage.

Now I need to publish my library to it so:

  • Edit pubspec.yaml and add publish_to: https://pub.myserver.com
  • Set Token with dart pub token add https://pub.myserver.com
  • Push library with dart pub publish

The publish process start, ask me to confirm that I want to publish my library but after select y I get this error:

Do you want to publish std02 1.0.0 (y/N)? y
Uploading... 
Bad state: Cannot use origin without a scheme: /api/packages/versions/newUpload
dart:core                                          _SimpleUri.origin
package:pub/src/http.dart 82:23                    _PubHttpClient._shouldAddMetadata
package:pub/src/http.dart 48:9                     _PubHttpClient.send
package:http/retry.dart 109:33                     RetryClient.send
package:pub/src/http.dart 175:39                   _ThrowingClient.send
package:pub/src/http.dart 379:31                   _ThrottleClient.send
===== asynchronous gap ===========================
package:pub/src/authentication/client.dart 52:24   _AuthenticatedClient.send
===== asynchronous gap ===========================
package:pub/src/command/lish.dart 114:44           LishCommand._publishUsingClient.<fn>
===== asynchronous gap ===========================
package:pub/src/command/lish.dart 91:7             LishCommand._publishUsingClient
===== asynchronous gap ===========================
package:pub/src/authentication/client.dart 133:12  withAuthenticatedClient
===== asynchronous gap ===========================
package:pub/src/command/lish.dart 184:9            LishCommand._publish
===== asynchronous gap ===========================
package:pub/src/command/lish.dart 241:7            LishCommand.runProtected
This is an unexpected error. The full log and other details are collected in:

    /Users/user/.pub-cache/log/pub_log.txt

Consider creating an issue on https://github.com/dart-lang/pub/issues/new
and attaching the relevant parts of that log file.

What i made wrong?

Thanks a lot.

@talisk
Copy link
Collaborator

talisk commented Feb 24, 2023

Can you paste the full log in /Users/user/.pub-cache/log/pub_log.txt ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants