Skip to content
This repository was archived by the owner on Feb 14, 2019. It is now read-only.

Conversation

@CityVibes
Copy link
Contributor

CloudSdk Release 0.4.2

  • Support for all device types/names by platform id
  • Global listener in ParticleCloud for system events
  • resetFlashingState - works with global system events instead of flashing timer
  • Fix for eventName emitting "message" most of the time
  • Org endpoints changed to product id
  • Password reset url changed to match url used in iOS.

@CityVibes CityVibes self-assigned this Mar 30, 2017
@CityVibes CityVibes requested review from idokleinman and jensck March 30, 2017 17:58
Copy link
Contributor

@idokleinman idokleinman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I only see the changes for "Workaround/fix for sign up not throwing exception on error." in this PR, while the changelog contains a bunch of other changes - I guess some were in other PRs.

In the future let's try to package all the version changes into a single branch before merging to master.

@CityVibes CityVibes merged commit 2bce33b into master Mar 31, 2017
@CityVibes CityVibes deleted the prerelease branch March 31, 2017 15:36
@Lcstyle
Copy link

Lcstyle commented Apr 5, 2017

There's a defect introduced for signup with orgs.

The defect causes the following exception during signup flow. Apparently you are passing in username, but the endpoint requires "email"

04-04 21:13:24.538 18900-18900/io.particle.devicesetup.exampleapp E/Async: Error calling API: email was empty
io.particle.android.sdk.cloud.ParticleCloudException
at io.particle.android.sdk.cloud.ParticleCloud.signUpAndLogInWithCustomer(ParticleCloud.java:243)
at io.particle.android.sdk.accountsetup.CreateAccountActivity$1.callApi(CreateAccountActivity.java:223)
at io.particle.android.sdk.accountsetup.CreateAccountActivity$1.callApi(CreateAccountActivity.java:218)
at io.particle.android.sdk.utils.Async$AsyncApiWorker.doInBackground(Async.java:105)
at io.particle.android.sdk.utils.Async$AsyncApiWorker.doInBackground(Async.java:73)
at android.os.AsyncTask$2.call(AsyncTask.java:295)
at java.util.concurrent.FutureTask.run(FutureTask.java:237)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1113)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:588)
at java.lang.Thread.run(Thread.java:818)

here's the request log:

04-04 21:13:24.047 18900-19490/io.particle.devicesetup.exampleapp D/Retrofit: ---> HTTP POST https://api.particle.io/v1/products/mypid/customers
04-04 21:13:24.047 18900-19490/io.particle.devicesetup.exampleapp D/Retrofit: Authorization: Basic
04-04 21:13:24.047 18900-19490/io.particle.devicesetup.exampleapp D/Retrofit: Content-Type: application/json; charset=UTF-8
04-04 21:13:24.047 18900-19490/io.particle.devicesetup.exampleapp D/Retrofit: Content-Length: 195
04-04 21:13:24.047 18900-19490/io.particle.devicesetup.exampleapp D/Retrofit: {"account_info":{"business_account":false,"company_name":"","first_name":"LC","last_name":"LC"},"grant_type":"client_credentials","password":"password","username":"myemail@addr.com"}
04-04 21:13:24.047 18900-19490/io.particle.devicesetup.exampleapp D/Retrofit: ---> END HTTP (195-byte body)
04-04 21:13:24.534 18900-19490/io.particle.devicesetup.exampleapp D/Retrofit: <--- HTTP 400 https://api.particle.io/v1/products/pid/customers (487ms)
04-04 21:13:24.534 18900-19490/io.particle.devicesetup.exampleapp D/Retrofit: date: Wed, 05 Apr 2017 01:13:23 GMT
04-04 21:13:24.534 18900-19490/io.particle.devicesetup.exampleapp D/Retrofit: content-type: application/json; charset=utf-8
04-04 21:13:24.534 18900-19490/io.particle.devicesetup.exampleapp D/Retrofit: content-length: 49
04-04 21:13:24.534 18900-19490/io.particle.devicesetup.exampleapp D/Retrofit: server: nginx
04-04 21:13:24.534 18900-19490/io.particle.devicesetup.exampleapp D/Retrofit: access-control-allow-origin: *
04-04 21:13:24.534 18900-19490/io.particle.devicesetup.exampleapp D/Retrofit: etag: W/"31-2D+FHyqUgn91qL7x9izngg"
04-04 21:13:24.534 18900-19490/io.particle.devicesetup.exampleapp D/Retrofit: OkHttp-Sent-Millis: 1491354804432
04-04 21:13:24.534 18900-19490/io.particle.devicesetup.exampleapp D/Retrofit: OkHttp-Received-Millis: 1491354804534
04-04 21:13:24.535 18900-19490/io.particle.devicesetup.exampleapp D/Retrofit: {"ok":false,"code":400,"error":"email was empty"}
04-04 21:13:24.535 18900-19490/io.particle.devicesetup.exampleapp D/Retrofit: <--- END HTTP (49-byte body)

here's the doc page for the endpoint:

https://docs.particle.io/reference/api/#create-a-customer---client-credentials

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants