microsoft / appcenter-cli Goto Github PK
View Code? Open in Web Editor NEWCommand-line Interface (CLI) for Visual Studio App Center
Home Page: https://appcenter.ms/
License: MIT License
Command-line Interface (CLI) for Visual Studio App Center
Home Page: https://appcenter.ms/
License: MIT License
Unable to push release from collaborators account. Only owners account is working for release.
There's a newline between each entry. Using a table with a header and maybe an additional display_name
column would be much nicer looking.
Hi, I've found issue with very rare repro steps, but I believe it should be fixed due to server returns correct response.
Environment:
$ appcenter -v
appcenter version 1.0.5
Repro steps:
appcenter login
appcenter tokens list
or another command that requires authorizationActual:
Error: Command 'tokens list' failed with exception "apiTokensResponse.result.map is not a function"
Expected:
Error: Command 'appcenter tokens list' requires a logged in user. Use the 'appcenter login' command to log in.
I have some 47 tests and it takes more than an hour to run all of them on real devices. I tried --timeout command but they always timeout in about an hour. I think this is because you can not run more than 1 hour long tests in xamarin cloud but we don't have option for paid account during preview period of mobile center(may be i missed it?)
On mobile-center-cli v0.12.0
Run a mobile-center test run uitest
command with a single --fixture
, --include-category
or --exclude-category
parameter
Outputs: Error: this.fixture.forEach is not a function
Include the command twice. E.g. --fixture Tests --fixture Tests
A fix for this issue is in this PR
When piping stdout to a file i get a bunch of escape characters in there ala:
�[2K�[1G\ Uploading files...�[2K�[1G\ Uploading files...�[2K�[1G\ Uploading files... ...
It would be nice to check if stdout is a file and simplify the progress output in that case.
I'm not sure if this should go into Contributing or Readme. The latter would yield greater visibility as it is always visible when visiting the repo's main page, the former fits a bit better semantically.
For a good example see https://github.com/Microsoft/mobile-center-sdk-ios/pull/196/files
The type signature for this code is:
function globSingleFile(pattern: string, options?: g.Options): Promise<string>
The code that resolves the final promise is:
resolve(matches);
However, matches
is an array. So the actual value returned is a string[]
, not a string
, which will cause all sorts of weird errors down the line.
Change that line to resolve(matches[0]);
When creating an app any error messages from the server are ignored.
$ appcenter apps create -p "React-Native" -o "ios" -d foobar
Error: the request was rejected for an unknown reason
$ appcenter apps create -p "React-Native" -o "ios" -d foobar --debug
logFilter, request: WebResource {
rawResponse: false,
queryString: {},
url: 'https://api.appcenter.ms/v0.1/apps',
method: 'POST',
headers:
{ 'Content-Type': 'application/json; charset=utf-8',
'user-agent': 'appcenterCli/1.0.2 NodeJS/v7.7.1 win32/10.0.15063',
'x-api-token': '...' },
body: '{"display_name":"foobar","os":"ios","platform":"React-Native"}' }
| Creating app ...Response status code: 400
Body: {"error":{"code":"BadRequest","message":"Validation error for body parameter \"app.os\": No enum match for: ios"}}
Error: the request was rejected for an unknown reason
The argument should be "iOS", not "ios", and "Android", not "android". The error message could be more helpful.
The command shown in the migration guide is wrong:
https://docs.microsoft.com/en-us/appcenter/distribution/codepush/migrationguide
Creating an App in the App Center CLI:
appcenter apps create -p "React-Native" -o "ios" -d "MyApp"
When attempting to login on a Windows 10 box running node 7.1, you get:
> mobile-center login
(node:13360) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 2): Error: This socket is closed
(node:13360) DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
and then the CLI freezes up for quite a while waiting for some sort of timeout.
Works fine on Node 6.9.
mobile-center analytics sessions --duration --output csv includes an extra comma at the end of each line.
Session Durations,,
0-10s,116,
10-30s,2,
30s-1min,5,
1-30min,5,
30min-1h,0,
>1h,0,
Since we need to use the new swagger endpoints from internal bifrost, we need to update swagger file in the cli so that I can further add commands. But when I tried to run: gulp autorest, I got errors to build it successfully. I figured it out that other services have updated their endpoints, which conflicts with the existing cli commands. We need to resolve this issue so that we can pull the latest swagger successfully.
The Rx JS package is powerful, but very large. rx-lite should do everything we need at 10% of the size.
Update inquirer to latest version - this was what originally brought in Rx in the first place, it now uses rx-lite
Replace our use of rx with rx-lite - it's primarily in the token store code.
Hi!
Today I migrated from code-push-cli
to appcenter-cli
, but I'm having a problem, I use the generated bundle and sourcemap to upload them for sentry
:
https://docs.sentry.io/clients/react-native/codepush/
But, in the final of the release process the appcenter-cli
delete the generated folder:
https://github.com/Microsoft/appcenter-cli/blob/master/src/commands/codepush/release-react.ts#L153
I want to propose a flag to avoid delete the output dir, so I could keep the files after a release.
A few suggestions:
display_name
and name
name
instead of showing the value plainly, similar to what we do in the UI:System: OS X Sierra 10.12.6, mobile-center version 0.11.0
, zsh
Installing setup-autocomplete
causes to complete filenames to stop working.
It would be great to get both autocomplete and tab-complete file names.
Example:
➜ espresso ls
total 69864
drwxr-xr-x@ 4 krukow staff 136B Oct 10 14:44 ./
drwx------+ 89 krukow staff 3.0K Oct 10 15:59 ../
-rw-r--r--@ 1 krukow staff 2.4M Oct 10 14:44 gc-androidTest.apk
-rw-r--r--@ 1 krukow staff 32M Oct 10 14:44 gc.apk
➜ espresso mobile-center test run espresso --app "karl.krukow/Example-espresso" \
--devices any_top_1_device \
--app-path gc.ap<TAB> \
--build-dir ./ \
--debug --test-series master --output --test-parameter test=test
the here does not complete the filename gc.app
here does not complete file.
Deleting an analytics event do not delete the associated properties.
When a new event is sent with the same name, the old property values are there.
It would be great to be able to clear everything for an event (full reset).
The mobile-center
CLI supports a --version
or -v
option. However, this is not discoverable from the help output:
➜ code mobile-center help
Mobile Center helps you build, test, distribute, and monitor mobile apps.
Usage: mobile-center <command>
Commands:
analytics View events, audience info, sessions, and
other anayltics for apps
apps View and manage apps
build Start builds, get their status, and
download artifacts
codepush View and manage CodePush deployments and
releases
crashes Upload symbols for better crash reports
distribute Send builds to testers and manage
distribution groups
orgs Manage organizations
profile Manage your profile
telemetry Manage telemetry preferences
test Start test runs and get their status
tokens Manage API tokens
help Get help using mobile-center commands
login Log in
logout Log out
setup-autocomplete Setup tab completion for your shell
Please let me know if there's a new release of mobile-center-cli
and how to update.
$ mobile-center help
*An update is available* Install it with: mobile-center update
mobile-center analytics audience --devices
has an extra comma on each line
Devices,,,
Nexus 6P,22,84.61538461538461,
Galaxy Nexus,1,3.8461538461538463,
SAMSUNG-SM-G870A,1,3.8461538461538463,
GT-I9500,1,3.8461538461538463,
Android SDK built for x86,1,3.8461538461538463,
Right now, it appears as if orgs create -n "some-name"
requires the name
attribute only.
I think this could be improved by mirroring the UI experience where we send a display_name
and let the backend auto-generate a name
.
PR here #307
kamstrup@mandrill:~$ appcenter
module.js:538
throw err;
^
Error: Cannot find module './generated/AppCenterClient'
at Function.Module._resolveFilename (module.js:536:15)
at Function.Module._load (module.js:466:25)
at Module.require (module.js:579:17)
at require (internal/module.js:11:18)
at Object.<anonymous> (/usr/lib/node_modules/appcenter-cli/dist/util/apis/create-client.js:6:25)
at Module._compile (module.js:635:30)
at Object.Module._extensions..js (module.js:646:10)
at Module.load (module.js:554:32)
at tryModuleLoad (module.js:497:12)
at Function.Module._load (module.js:489:3)
Macaca is an open-source automation test solution for native, hybrid, mobile web and web application on mobile and desktop platforms.
mobile-center analytics sessions
includes --duration and --sessions options
I would expect them both to be plural --durations and --sessions
This is a follow-up to #226
Currently, commands like apps list
and orgs list
output very minimal information and getting more details always requires using an additional x show
command on a single entity to get more details.
I would suggest to come up with a format, like a table, that outputs most of the useful/necessary information right in the list
command's output.
Something like this:
| Display name | Name | OS | Platform | Origin |
| ------------ | ----------- | ------- | -------- | ------------- |
| My Test App | my-test-app | iOS | Xamarin | mobile-center |
| Some App | some-app | Windows | UWP | hockeyapp |
or
| Display Name | Name | Origin |
| ------------- | ------------- | ------------- |
| Mobile Center | mobile-center | mobile-center |
When trying to use the new analytics log-flow
command I only get back an error stating the logs failed to load.
$ node dist/index.js analytics log-flow --app "user/App-Name"
Command failed: failed to load the logs
Example reproduction:
$ mobile-center test run uitest --app "-a-/app" \
--devices 12345678 --app-path MyDrivingiOS.ipa \
--test-series "master" --locale "en_US" \
--build-dir MyDriving/MyDriving.UITests/bin/Debug \
--uitest-tools-dir packages/Xamarin.UITest.2.1.3/tools
Preparing tests... done.
Error: app.match is not a function
mobile-center test generate uitest --platform "android" --output-path "C:\Users\user1\test1"
This command does not generate any files in the specified --output-path, seems to hang.
Platform: Windows 10
mobile-center CLI: v 0.11.0
A user has reported that mobile-center test fails upload of ios apps if the .app name contains a space.
we can upload symbols with this. can you add uploading of sourcemaps too? so we can use this tool to upload everything needed for a react native app to mobile center.
Here's the current output of running mobile-center
without any arguments. We should spruce it up!
$ mobile-center
mobile-center
mobile-center
Command to start with the Mobile Center CLI
mobile-center apps Commands to manage applications in Mobile Center
mobile-center build Commands for queueing builds, getting build status and downloading binaries and logs for completed builds
mobile-center crashes Command to upload symbols to get symbolicated crash reports on Mobile Center
mobile-center distribute Commands for the releases and distribution groups manipulation
mobile-center profile Commands to manage profile information in Mobile Center
mobile-center telemetry Commands to manage the sending of telemetry from Mobile Center commands
mobile-center test Command for preparing, starting and checking state of Mobile Center tests
mobile-center tokens Commands to manage API tokens in Mobile Center
mobile-center help Get command or category help
mobile-center login Login to Mobile Center
mobile-center logout Logout from Mobile Center
It only prints (potentially) very long list of app name
s without any additional info like display_name
, OS, platform, description, etc.
I feel we might be able to re-use what we have for apps list
?
Currently, appcenter
script doesn't work on Linux. It looks like .gitattributes
need to be updated after renaming b5cc661.
# npm install -g appcenter-cli
$ appcenter
/usr/bin/env: ‘node\r’: No such file or directory
appcenter
script should work on Linux.
$ mobile-center test run xcuitest \
--devices "${1}" \
--token "${API_TOKEN}" \
--build-dir "${WORKSPACE}" \
--test-series "${SERIES}" \
--disable-telemetry
The test to upload.
Preparing tests... done.
Error: Command 'test run xcuitest ...' failed with exception "Cannot read property 'email'
of null"
mobile-center analytics sessions returns values for an unspecified time-range.
It doesn't correspond to the last7, last30, last60 or last90 options in the portal.
0-10s 4
10-30s 0
30s-1min 0
1-30min 1
30min-1h 0
>1h 0
Session Statistics
Total Sessions 5 0%
Average Sessions Per Day 5 100%
Average Session Length (sec) 28.38 100%
I was spinning up a toy app using Swift and the framework (Vapor) did this delightful thing I think we can "borrow".
$tmp vapor --help
Usage: vapor <new|build|run|fetch|clean|test|xcode|version|self|heroku|docker>
**Join our Slack if you have questions, need help, or want to contribute: http://vapor.team**
I don't know if we have a public community chat yet, but it would be a nice little touch to invite people to proactively engage with us as they start to learn how to use the service.
cc @ranterle
Not exactly sure what this is about, but when I try to star tan xcuitest I get the very unhelpful message:
$ mobile-center test run xcuitest --app-path XTCiOSSample.ipa --app "kamikkel/XTCiOSSample-xcuitest" --devices 9847d512 --test-series "master" --locale "en_US" --test-ipa-path ddp/Build/Products/Debug-iphoneos/integrationTestsUITests-Runner.ipa
Preparing tests... done.
Validating arguments... done.
Creating new test run... failed.
Error: {"message":"","code":"Not Found"}
Exit code 3.
If I run with --debug
I can see that it is not about my local files, but I get a 404 from the server:
Preparing tests... done.
Validating arguments... done.
logFilter, request: WebResource {
rawResponse: false,
queryString: {},
url: 'https://bifrost-staging.trafficmanager.net/v0.1/apps/kamikkel/XTCiOSSample-xcuitest/test_runs',
method: 'POST',
headers:
{ 'Content-Type': 'application/json; charset=utf-8',
'user-agent': 'mobile-centerCli/0.11.0 NodeJS/v6.11.0 linux/4.10.0-33-generic',
'x-api-token': '0c52f44bcdf73aa2369f576bd57edeb88e2b3114',
'internal-request-source': 'cli',
'diagnostic-context': '08fc66c5-293c-48a2-b340-535e545c35fc',
'cli-command-name': 'test run xcuitest' },
body: null }
/ Creating new test run... Response status code: 404
Body: {"message":"","code":"Not Found"}
Creating new test run... failed.
Error: {"message":"","code":"Not Found"}
It seems the latest commit introduced an error that prevents the application from building. If I change my working copy to the previous commit (926542b44889c6791c2252099978ca65515f0da3
) I am able to build without a problem.
v7.10.0
v4.2.0
npm install
2017-05-18T01_25_45_231Z-debug.txt
[redacted]:mobile-center-cli [redacted]$ npm install
npm WARN deprecated [email protected]: Use uuid module instead
npm WARN deprecated [email protected]: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
npm WARN deprecated [email protected]: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
npm WARN deprecated [email protected]: graceful-fs v3.0.0 and before will fail on node releases >= v7.0. Please update to graceful-fs@^4.0.0 as soon as possible. Use 'npm ls graceful-fs' to find it in the tree.
npm WARN prepublish-on-install As of npm@5, `prepublish` scripts will run only for `npm publish`.
npm WARN prepublish-on-install (In npm@4 and previous versions, it also runs for `npm install`.)
npm WARN prepublish-on-install See the deprecation note in `npm help scripts` for more information.
> [email protected] prepublish [redacted]/mobile-center-cli
> gulp prepublish
module.js:472
throw err;
^
Error: Cannot find module '../dist/util/commandline/option-decorators'
at Function.Module._resolveFilename (module.js:470:15)
at Function.Module._load (module.js:418:25)
at Module.require (module.js:498:17)
at require (internal/module.js:20:19)
at Object.<anonymous> ([redacted]/mobile-center-cli/scripts/autocomplete-tree.js:4:26)
at Module._compile (module.js:571:32)
at Object.Module._extensions..js (module.js:580:10)
at Module.load (module.js:488:32)
at tryModuleLoad (module.js:447:12)
at Function.Module._load (module.js:439:3)
npm ERR! Darwin 16.6.0
npm ERR! argv "/usr/local/Cellar/node/7.10.0/bin/node" "/usr/local/bin/npm" "install"
npm ERR! node v7.10.0
npm ERR! npm v4.2.0
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] prepublish: `gulp prepublish`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] prepublish script 'gulp prepublish'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the mobile-center-cli package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! gulp prepublish
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs mobile-center-cli
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls mobile-center-cli
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! /Users/[redacted]/.npm/_logs/2017-05-18T01_25_45_231Z-debug.log
mobile-center analytics sessions doesn't include headers for the columns
Session Durations
0-10s 116
10-30s 2
30s-1min 5
1-30min 5
30min-1h 0
>1h 0
Session Statistics
Total Sessions 128 -17.95%
Average Sessions Per Day 4.13 -15.3%
Average Session Length (sec) 7.53 152.79%
For example, when I do mobile-center help build queue
, the --branch
and --debug-logs
options are the most relevant for this specific command, but they are listed last.
In fact, --debug
, --output
, --token
, --env
, --version
, --disable-telemetry
seem rarely relevant and are not command-specific.
$ mobile-center help build queue
mobile-center build queue [--debug] [--output <arg>] [--token <arg>] [--env <arg>] [-h|--help] [--quiet]
[-v|--version] [--disable-telemetry] [-a|--app <arg>] -b|--branch <arg> [-d|--debug-logs]
Queue a new build
Command Options:
--debug Output additional debug information for this command
--output <arg> Format of output for this command: json
--token <arg> API Token to use for this command
--env <arg> Environment to connect to when using api token
-h|--help Display help for this command
--quiet Auto-confirm any requests, do not prompt for input
-v|--version Display command's version
--disable-telemetry Do not send any CLI telemetry for this command, overriding defaults
-a|--app <arg> Specify application for command to act on
-b|--branch <arg> Branch to be build
-d|--debug-logs Enable debug mode
If you install 'mobile-center' with npm you get an outdated version of the cli available on the command line (0.9.1 I believe) and no amount of npm updating mobile-center will give you the latest version. If you install 'mobile-center-cli you get the latest. This is really confusing.
I am using the following command:
appcenter build download -t build -i "my-id" -a "my-app-name" --token "my-token"
and I'm getting this error message:
failed with exception "Can't find end of central directory : is this a zip file ? If it is, see https://stuk.github.io/jszip/documentation/howto/read_zip.html"
If I try this command without specifying the app-name I get error message:
failed with exception "End of data reached (data length = 71699727, asked index = 1583568238). Corrupted zip ?"
I am able to download symbols and logs for the same build but I cannot download build.
appcenter version 1.0.5
We generate our versionName
and versionCode
values dynamically, so with code-push
in the past we've had to manually specify the target binary version using the flag --targetBinaryVersion
.
First off, with appcenter
that flag is now listed as --target-binary-version
. That's fine.
However, even if you specify the --target-binary-version
or -t
flag when using appcenter codepush release-react
, it still complains about not being able to find the version and actually says you should use the --targetBinaryVersion
flag:
Detecting android app version:
Error: Command 'codepush release-react -a joshuapinter/CNTRAL-Mobile --deployment-name Staging --entry-file index.android.js --gradle-file ./cntral/build.gradle -t 6.53.0' failed with exception "The "android.defaultConfig.versionName" property value in "./cntral/build.gradle" is not a valid string. If this is expected, consider using the --targetBinaryVersion option to specify the value manually."
Neither of those flags work, tho.
What are the 2nd and 3rd column in the output?
Devices,,,
Nexus 6P,22,84.61538461538461,
Galaxy Nexus,1,3.8461538461538463,
SAMSUNG-SM-G870A,1,3.8461538461538463,
GT-I9500,1,3.8461538461538463,
Android SDK built for x86,1,3.8461538461538463,
I am not able to upload an espresso test at all. No matter how I format the arguments ithe m-c cli always appends a '~' to the --build-dir argument. Thus pointing at a non-existing directory.
Example. I have an app and corresponding test apk in /home/kamstrup/Downloads:
$ mobile-center test run espresso --app "kamikkel/MyApp" --devices 31be1403 --app-path Downloads/myApp.apk --test-series "master" --locale "en_US" --build-dir Downloads
\ Preparing tests... events.js:160
throw er; // Unhandled 'error' event
^
Error: EACCES: permission denied, open 'Downloads/~'
at Error (native)
(this is with m-c cli version 0.9.1, there seem to have been 2 releases since then, but I can not update via npm for some reason? (just tried with 0.11.0 and still have the issue))
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.