URL:https://pub.dev/packages/german_words
URL:https://pub.dev/packages/arabic_words
URL:https://pub.dev/packages/multilanguages_words
flutter packages pub publish
i get this output " like always "
[[
Looks great! Are you ready to upload your package (y/n)? y
Pub needs your authorization to upload packages on your behalf.
In a web browser, go to https://accounts.google.com/o/oauth2/auth?...... etc
Then click "Allow access".
]]
the problem is when i click on the authorization link , i get this error
https://i.imgur.com/7HrV5zQ.png
it's contains is
[[
Error: invalid_scope
Some requested scopes were invalid. {invalid=[openi]}
Learn more
Request Details
access_type=offline
approval_prompt=force
response_type=code
client_id=xxxxxx5108-8xxxxxxxxxx.apps.googleusercontent.com
redirect_uri=http://localhost:46770
scope=openi
That鈥檚 all we know.
]]
>
{invalid=[openi]} - this seems to indicate either a bug in pub client (unlikely, as others are able to publish without issues), or a problem with your credentials.json or network environment.
Please try the following:
flutter packages pub logout (or just delete the credentials.json file in your ~/.pub-cache directory (%APPDATA%\Pub\Cache on Windows).-v command line option, and include the log again if unsuccessful.thanks a lot for your help , ii logged out same error message
and the credentials.json file not exist anymore cause i logged out as you know .
i published the package with using -v
here is the output
`D:\AndroidStudioProjects\german_words>flutter packages pub publish -v
FINE: Pub 2.5.0-dev.1.0.flutter-0ca1582afd
IO : Spawning "cmd /c ver" in D:\AndroidStudioProjects\german_words.
IO : Finished ver. Exit code 0.
| stdout:
| |
| | Microsoft Windows [Version 10.0.18362.267]
| Nothing output on stderr.
IO : Spawning "cmd /c git --version" in D:\AndroidStudioProjects\german_words.
IO : Finished git. Exit code 0.
| stdout:
| | git version 2.22.0.windows.1
| Nothing output on stderr.
FINE: Determined git command git.
IO : Spawning "cmd /c git check-ignore --quiet ." in D:\AndroidStudioProjects\german_words.
IO : Finished git. Exit code 128.
| Nothing output on stdout.
| stderr:
| | fatal: not a git repository (or any of the parent directories): .git
FINE: Archiving and publishing german_words 0.1.24 (.).
MSG : Publishing german_words 0.1.24 to https://pub.dartlang.org:
| |-- CHANGELOG.md
| |-- LICENSE
| |-- ReadMe.md
| |-- example
| | '-- readme.md
| |-- german_words.iml
| |-- lib
| | |-- german_words.dart
| | '-- pubspec.yaml
| |-- pubspec.yaml
| '-- test
| '-- german_words_test.dart
FINE: Creating .tar.gz stream containing:
| .\CHANGELOG.md
| .\example\readme.md
| .\german_words.iml
| .\lib\german_words.dart
| .\lib\pubspec.yaml
| .\LICENSE
| .\pubspec.yaml
| .\ReadMe.md
| .\test\german_words_test.dart
IO : Created temp directory C:\Users\BASHAR~1\AppData\Local\Temp\pub_86c0d215-b3ac-11e9-b153-705a0fb957e1
IO : Writing 145 characters to text file C:\Users\BasharBachir\AppData\Local\Temp\pub_86c0d215-b3ac-11e9-b153-705a0fb957e1\files.txt.
FINE: Contents:
| CHANGELOG.md
| example\readme.md
| german_words.iml
| lib\german_words.dart
| lib\pubspec.yaml
| LICENSE
| pubspec.yaml
| ReadMe.md
| test\german_words_test.dart
IO : Reading binary file .\ReadMe.md.
IO : Read 53 bytes from .\ReadMe.md.
IO : Reading binary file .\CHANGELOG.md.
IO : Read 52 bytes from .\CHANGELOG.md.
IO : Spawning "C:\flutterbincache\dart-sdk\lib_internal\pubasset\7zip\7za.exe a -wD:\AndroidStudioProjects\german_words. C:\Users\BasharBachir\AppData\Local\Temp\pub_86c0d215-b3ac-11e9-b153-705a0fb957e1\intermediate.tar @C:\Users\BasharBachir\AppData\Local\Te
mp\pub_86c0d215-b3ac-11e9-b153-705a0fb957e1\files.txt" in D:\AndroidStudioProjects\german_words.
IO : Finished C:\flutterbincache\dart-sdk\lib_internal\pubasset\7zip\7za.exe. Exit code 0.
| stdout:
| |
| | 7-Zip (A) 9.20 Copyright (c) 1999-2010 Igor Pavlov 2010-11-18
| | Scanning
| |
| | Creating archive C:\Users\BasharBachir\AppData\Local\Temp\pub_86c0d215-b3ac-11e9-b153-705a0fb957e1\intermediate.tar
| |
| | Compressing CHANGELOG.md
| | Compressing example\readme.md
| | Compressing german_words.iml
| | Compressing lib\german_words.dart
| | Compressing lib\pubspec.yaml
| | Compressing LICENSE
| | Compressing pubspec.yaml
| | Compressing ReadMe.md
| | Compressing test\german_words_test.dart
| |
| | Everything is Ok
| Nothing output on stderr.
IO : Spawning "C:\flutterbincache\dart-sdk\lib_internal\pubasset\7zip\7za.exe a unused -tgzip -so C:\Users\BasharBachir\AppData\Local\Temp\pub_86c0d215-b3ac-11e9-b153-705a0fb957e1\intermediate.tar" in D:\AndroidStudioProjects\german_words.
IO : Deleting directory C:\Users\BasharBachir\AppData\Local\Temp\pub_86c0d215-b3ac-11e9-b153-705a0fb957e1.
FINE:
Looks great! Are you ready to upload your package (y/n)? Showing confirm message:
| Looks great! Are you ready to upload your package
y
FINE: Loading OAuth2 credentials.
MSG : Pub needs your authorization to upload packages on your behalf.
| In a web browser, go to https://accounts.google.com/o/oauth2/auth?access_type=offline&approval_prompt=force&response_type=code&client_id=818368855108-8grd2eg9tj9f38os6f1urbcvsq399u8n.apps.googleusercontent.com&redirect_uri=http%3A%2F%2Flocalhost%3A57001&scope
=openid+https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fuserinfo.email
| Then click "Allow access".
|
| Waiting for your authorization...
`
when i press on the link or copy it and past it on another Browser not just Chrome the same error happening again
`400. That鈥檚 an error.
Error: invalid_request
Missing required parameter: scope
Learn more
Request Details
access_type=offline
approval_prompt=force
response_type=code
client_id=818368855108-8grd2eg9tj9f38os6f1urbcvsq399u8n.apps.googleusercontent.com
redirect_uri=http://localhost:57001
scope=
That鈥檚 all we know.`
thanks again for your help
It looks like the URL is breaking up in your terminal. You'll need to copy two segments and concatenate together: in the above example https://[...]&scope and =openid+[...]userinfo.email needs to be put together, without any extra spaces and characters, and then put that into the browser's URL.
thanks a lot for your help , Yes, you are right, solved
Hmm, maybe we should do some tricks to make a shorter URL.
Hmm, maybe we should do some tricks to make a shorter URL.
Maybe it could start with a http://localhost:xyxy/start which redirects to the real URL?
Maybe it could start with a
http://localhost:xyxy/startwhich redirects to the real URL?
That's a really good idea :)
Most helpful comment
{invalid=[openi]}- this seems to indicate either a bug in pub client (unlikely, as others are able to publish without issues), or a problem with yourcredentials.jsonor network environment.Please try the following:
flutter packages pub logout(or just delete thecredentials.jsonfile in your~/.pub-cachedirectory (%APPDATA%\Pub\Cacheon Windows).-vcommand line option, and include the log again if unsuccessful.