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

Check cloud vendor availability #128

Closed
KazuCocoa opened this issue Sep 6, 2021 · 27 comments
Closed

Check cloud vendor availability #128

KazuCocoa opened this issue Sep 6, 2021 · 27 comments

Comments

@KazuCocoa
Copy link
Member

Appium Inspector has a feature to connect to cloud vendor environments. Each vendor contributed to AppiumDesktop to allow AD to attach to their environment.

This repository (appium-inspector) now uses web2driver, which uses webdriverio as its backend, to support W3C spec capabilities for Appium 2.0. Appium 2.0 will drop MJSONWP style, so this change is mandatory as appium inspector.

Then, potentially vendors have an issue in their connectivity. I guess especially vendors modify desiredCapabilities might affect them.

@KazuCocoa
Copy link
Member Author

KazuCocoa commented Sep 6, 2021

Hello everyone. Thanks for adding your vendor availability in AppiumDesktop.
AppiumDesktop is moving to appium-inspector (inspector part) and appium-desktop (bundled appium server part). This repository is the new inspector part.

The backend is going to W3C based client (web2driver(webdriverio as its backend)) for Appium 2.0.
Could you confirm if this inspector works in your environment?
I guess vendors which modify desiredCapabilities in

export function newSession (caps, attachSessId = null) {
should check carefully..

The below mention is based on relevant contributors related to each vendor in Appium-Desktop.
Sorry if this mention reached someone who already no longer belonged to the company since they might need vendor prefix like your vendor prefix or appium:.

cc @wswebcreation (I know you already checked in another issue. Thanks so much!)

Thank you so much for your contributions, again.

@KazuCocoa
Copy link
Member Author

note: #118 is a known issue.

@huzaifaiftikhar
Copy link
Contributor

@KazuCocoa Thanks for mentioning. Should we check with the latest master code or the latest release of appium-inspector i.e. 2021.8.5?

@KazuCocoa
Copy link
Member Author

I think #118 branch should try first. (although potentially the same issue addressed in the PR happen)

@KazuCocoa
Copy link
Member Author

https://github.com/appium/appium-inspector#development is how to launch the inspector instance

@testingbot
Copy link
Contributor

Thanks for letting us know. We've sent a PR with a fix for TestingBot integration: #130

@Dan-Maor
Copy link
Contributor

Dan-Maor commented Sep 9, 2021

Thanks for the heads up, we will start working on it as soon as possible.

@huzaifaiftikhar
Copy link
Contributor

@KazuCocoa I've created a PR for fixing the integration with BrowserStack. Can you please review and merge? #139

@wswebcreation
Copy link
Contributor

@KazuCocoa and @jlipps ,

Sauce now works with this version
image
thanks!

We now need to fix accepting W3C caps on real devices which we didn't supported yet. If issues come to this repo then please close them and or ping me in them

@vishalweb
Copy link

vishalweb commented Sep 29, 2021

Bitbar Team @Walther , can you comment on this issue where we are not able to connect to bitbar device using Appium inspector. I had raised issue 123 which has been closed and moved to this issue. As per discussion with Appium Team, it's an issue at your end.
#123

@PatrickFlaherty
Copy link

I created a ticket with Bitbar around this issue and they said they would deploy a fix today the 29th. I just tried it and indeed it is fixed.

@vishalweb
Copy link

vishalweb commented Sep 30, 2021

Hi Patrick, Thanks for the information. however I am still not able to connect to bitbar device . I am getting following error. Would you mind sharing if you are passing any additional capabilities to connect to the device.

Note: passing the id generated on uploading ipa in bitbar_app and app package in app capability, removed from below image
image

@jlipps
Copy link
Member

jlipps commented Sep 30, 2021

I checked the Inspector code, and indeed the testdroid_source and testdroid_apiKey capabilities are not prefixed with a valid W3C vendor prefix. So someone at bitbar should make a PR to this repo to update them with the appropriate W3C-valid capability names (maybe they should be appium:testdroid_source etc?)

@KazuCocoa
Copy link
Member Author

I think ExperiTest and BitBar haven't responded here.
Let me see if they have support email addresses for non-account holders and send this issue to them.

@PatrickFlaherty
Copy link

@vishalweb, I was experiencing an issue with Appium Inspector 1.x and that is what Bitbar fixed. I did see the error your seeing with Inspector 2.0. I suspect the Bitbar possibly does not have support for Appium 2.0 but that just my guess.

@KazuCocoa
Copy link
Member Author

Ok, I've sent a support email to BitBar and ExperiTest.

@vishalweb
Copy link

vishalweb commented Oct 2, 2021

Thanks @PatrickFlaherty , @KazuCocoa and @jlipps . Will check with Appium Inspector 1.x version and wait for update from Bitbar on support ticket raised

Update 5 oct 2021: Checked on Appium Desktop 1.20.2 Appium inspector, issue has been fixed as mentioned by @PatrickFlaherty, able to connect to bitbar android and iOS . Issue still exists with Standalone Appium Inspector 2.0 for which @KazuCocoa has already raised a support ticket with Bitbar

@lastverb
Copy link

lastverb commented Oct 6, 2021

#128 (comment)

Note: passing the id generated on uploading ipa in bitbar_app and app package in app capability, removed from below image

This error is not a Bitbar response. Library used in this project validates capabilities before sending and this is the result. Example:
Screenshot 2021-10-05 at 15 50 02
Those caps are added here https://github.com/appium/appium-inspector/blob/main/app/renderer/actions/Session.js#L312. I have no idea what bitbar_source capability is. Bitbar doesn’t read or use it.

Bitbar accepts many formats for same capability regarding custom Bitbar capabilities. Including ones not in W3C spec with too long backward compatibility. Assuming there is capability named ‘name’:

  1. name
  2. bitbar_name
  3. appium:bitbar_name
  4. bitbar:name
  5. Sending any of above inside bitbar:options object either inside or on the same level as alwaysMatch
  6. few others that should not be pointed to

Options 1. and 2. are blocked by library used in this project. It’s most likely possible to disable this validation. Not all libraries do this.
Option 3. is what is currently being done when providing bitbar_name like before and checking prefix checkbox. Except those caps provided by application, not the user, don’t have prefixes.
Options 4. and 5. are preferred and most fitting W3C spec, however they only work for bitbar custom caps and you cannot pass standard appium nor webdriver capabilities this way. The special case is app capability. Original appium app requires path to application file and bitbar custom capability app expects id for app uploaded to bitbar. Probably because of some bug app alone (option 1) inside bitbar:options won’t work.

If this application is going to differentiate between vendor specific caps and appium ones prefixing both with separate prefixes, here is a list of bitbar specific capabilities:
username password apiKey target project description testrun device app locale testTimeout testrunId findDevice frameworkId appiumVersion multiSessionWait screenResolution idleTimeout testName timezone recordVideo

@jlipps
Copy link
Member

jlipps commented Oct 6, 2021

Options 1. and 2. are blocked by library used in this project. It’s most likely possible to disable this validation. Not all libraries do this.

This is a webdriverio restriction which we can't change as far as I'm aware.

What seems necessary is to simply update the section where hardcoded bitbar caps are introduced and add an appropriate prefix to them. Do you feel comfortable proposing that PR?

Any bitbar specific caps which are added by the user themselves we can simply require that the user use W3C-valid caps, which is fine.

@vishalweb
Copy link

Hi @jlipps ,
As mentioned in my previous comment

Update 5 oct 2021: Checked on Appium Desktop 1.20.2 Appium inspector, issue has been fixed as mentioned by @PatrickFlaherty, able to connect to bitbar android and iOS . Issue still exists with Standalone Appium Inspector 2.0 for which @KazuCocoa has already raised a support ticket with Bitbar

So the issue has been resolved by bitbar for the embedded Appium inspector in Appium desktop.
But I am still not able to connect to bitbar device using standalone Appium Inspector.

Please suggest if there is a proposed fix for this, as going forward, we would need to use Appium inspector standalone.

Appium inspector with checkbox ticked for automatically adding prefix, get below error
Screen Shot 2021-10-22 at 11 33 33 am

Without checking checkbox for prefixes, below error

Screen Shot 2021-10-22 at 11 35 27 am

Note: Able to connect with Bitbar devices through embedded Appium inspector in Appium desktop v1.20 as mentioned in comment update 5 oct 2021

@KazuCocoa
Copy link
Member Author

Like other vendors did in #128 (comment), we still need BitBar's help to update their capabilities (probably only:

desiredCapabilities.testdroid_source = 'appiumdesktop';
desiredCapabilities.testdroid_apiKey = accessKey;
) for W3C spec.

The reason why embedded Appium inspector in Appium desktop v1.20 worked was the old inspector followed non-W3C spec capabilities which would no longer work in Appium 2.0. This inspector is also going to follow W3C WebDriver spec. Vendors in #128 (comment) have updated their capabilities in this inspector to follow W3C spec. (They have added their own vendor prefix in their own capabilities.)

@vishalweb
Copy link

Thanks @KazuCocoa
Bitbar Team @Walther, would you be able to suggest if this fix is expected soon from Bitbar .

@KazuCocoa
Copy link
Member Author

Probably he no longer works there. (then, sorry for frequent mention to him)

I've sent emails as #128 (comment) so we only can wait for their actions. Nothing can do on this issue.

@Walther
Copy link

Walther commented Oct 22, 2021

Correct - I worked at Bitbar briefly in 2018, and have not been employed there in a while. However, when I got the first notification of this issue, I forwarded the email to my former colleagues to let them know. In case you are still having issues, the best avenue is probably to contact their support via official routes.

Best regards,

@vishalweb
Copy link

Thanks @Walther . We will contact Bitbar support.

@KazuCocoa
Copy link
Member Author

https://github.com/appium/appium-inspector/releases/tag/v2021.12.2 has most of fixes.
#225 is remaining, but let me check it on the pr itself.

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

9 participants