Closed elviofreitas closed 8 months ago
@elviofreitas Thank you for reporting the issue.
I found the problem that's causing
Encountered internal error running command: TypeError: Cannot read properties of undefined (reading 'split')
It's a minor fix, but I would take some time to fix this. Will update once fixed and new release is made. Please do report any other issues you face.
Hi @Dileep17, I'm facing the same issue. Any updates on the fix?
Ah! My bad. Missed this. Will fix this ASAP.
@hithisistushar fixed and released 1.1.0-beta.05. Please install 1.1.0-beta.05 and let me know it fixed the issue.
@Dileep17 Still getting the same error
TypeError: driver.getScreenshot is not a function at ReportPlugin.<anonymous> (/Users/username/.appium/node_modules/appium-reporter-plugin/lib/plugin.js:103:53) at Generator.next (<anonymous>) at fulfilled (/Users/username/.appium/node_modules/appium-reporter-plugin/lib/plugin.js:5:58) at processTicksAndRejections (node:internal/process/task_queues:95:5)
@hithisistushar could you
Thanks!
@Dileep17
I just followed the sample Java implementation from the plugin readme. I get the error as soon as I start the execution.
@hithisistushar Java implementation is running fine on my machine! I had to bump up appium java client to latest version, but that shouldn't be the reason for the issue you are facing!
Could you write a test to take a screenshot and run it without reporter plugin to verify if screenshots are working fine on your machine? We will take our investigation forward from there.
Unrelated to the issue you mentioned, based on the screenshot you provided, I see Unable to create /Users/tushar.raj/.appium/node_modules/appium-reporter-plugin/lib/data
>> this is error from plugin. data
will be used by plugin to store test execution data. Check the permissions.
@Dileep17 I am already on the latest appium version.
Wrote a simple method to capture screenshots and save it to a folder and I'm able to save them. (Did not use the reporter plugin)
Also, thanks for pointing the issue out, I gave permissions and now I see Requiring plugin at /Users/tushar.raj/.appium/node_modules/appium-reporter-plugin/lib/index.js [appium-reporter-plugin] /Users/tushar.raj/.appium/node_modules/appium-reporter-plugin/lib/data is deleted.
which I guess what I should see.
@hithisistushar Yeah.. There is a lot missing when data folder is created. Will add it in next release.
Reg. the error you are getting, I couldn't reproduce it in any manner!! Could you share the whole server log?? My only guess is that driver object is null and hence the not a method error!
2024-01-22 12:25:29:009 [AppiumDriver@d97a] Calling AppiumDriver.getStatus() with args: []
2024-01-22 12:25:29:011 [AppiumDriver@d97a] Plugins which can handle cmd 'getStatus': images,appium-reporter-plugin
2024-01-22 12:25:29:011 [AppiumDriver@d97a] Plugin appium-reporter-plugin is now handling cmd 'getStatus'
2024-01-22 12:25:29:011 [appium-reporter-plugin] session: null; cmd getStatus; processing command: getStatus
2024-01-22 12:25:29:011 [AppiumDriver@d97a] Plugin images is now handling cmd 'getStatus'
2024-01-22 12:25:29:011 [AppiumDriver@d97a] Executing default handling behavior for command 'getStatus'
2024-01-22 12:25:29:012 [appium-reporter-plugin] session: null; cmd getStatus; time taken by appium for cmd execution: 409 μs
2024-01-22 12:25:29:012 [appium-reporter-plugin] session: null; cmd getStatus; Command not in exlusion list for screenshot
2024-01-22 12:25:29:012 [appium-reporter-plugin] session: null; cmd getStatus; Failed to take screenshot
2024-01-22 12:25:29:014 [appium-reporter-plugin] TypeError: driver.getScreenshot is not a function
2024-01-22 12:25:29:014 [appium-reporter-plugin] at ReportPlugin.
@hithisistushar for some reason even after session is created, when getStatus comes to plugin, driver/session is null! I have bypassed screenshot flow when driver/session is null. Please try latest version!
occupied with other things, Sorry for delay! hope this resolves the error you are facing.
@Dileep17 Working with the latest version, thanks for the fix.
Found some issues using this plugin.
[Appium] Attempting to load plugin images... [debug] [Appium] Requiring plugin at C:\Users\admin.appium\node_modules\@appium\images-plugin [Appium] Attempting to load plugin appium-reporter-plugin... [debug] [Appium] Requiring plugin at C:\Users\admin.appium\node_modules\appium-reporter-plugin [appium-reporter-plugin] C:\Users\admin.appium\node_modules\appium-reporter-plugin\lib/data is deleted. [Appium] Welcome to Appium v2.0.1 [Appium] Non-default server args: [Appium] { [Appium] address: '127.0.0.1', [Appium] sessionOverride: true, [Appium] useDrivers: [ [Appium] 'windows' [Appium] ], [Appium] usePlugins: [ [Appium] 'images', [Appium] 'appium-reporter-plugin' [Appium] ] [Appium] } [Appium] Attempting to load driver windows... [debug] [Appium] Requiring driver at C:\Users\admin.appium\node_modules\appium-windows-driver [Appium] Appium REST http interface listener started on http://127.0.0.1:4723 [Appium] Available drivers: [Appium] - xcuitest@5.8.1 (automationName 'XCUITest') [Appium] - uiautomator2@2.34.0 (automationName 'UiAutomator2') [Appium] - gecko@1.2.7 (automationName 'Gecko') [Appium] - chromium@1.2.32 (automationName 'Chromium') [Appium] - windows@2.12.10 (automationName 'Windows') [Appium] Available plugins: [Appium] - images@2.1.6 (ACTIVE) [Appium] - appium-reporter-plugin@1.1.0-beta.04 (ACTIVE) [HTTP] --> GET /status [HTTP] {} [debug] [AppiumDriver@b3ae] Calling AppiumDriver.getStatus() with args: [] [AppiumDriver@b3ae] Plugins which can handle cmd 'getStatus': images,appium-reporter-plugin [AppiumDriver@b3ae] Plugin appium-reporter-plugin is now handling cmd 'getStatus' [appium-reporter-plugin] session: null; cmd getStatus; processing command: getStatus [AppiumDriver@b3ae] Plugin images is now handling cmd 'getStatus' [AppiumDriver@b3ae] Executing default handling behavior for command 'getStatus' [appium-reporter-plugin] session: null; cmd getStatus; time taken by appium for cmd execution: 452 μs [appium-reporter-plugin] session: null; cmd getStatus; Command not in exlusion list for screenshot [appium-reporter-plugin] session: null; cmd getStatus; Failed to take screenshot [appium-reporter-plugin] TypeError: driver.getScreenshot is not a function [appium-reporter-plugin] at ReportPlugin. (C:\Users\admin.appium\node_modules\appium-reporter-plugin\lib\plugin.js:103:53)
[appium-reporter-plugin] at Generator.next ()
[appium-reporter-plugin] at fulfilled (C:\Users\admin.appium\node_modules\appium-reporter-plugin\lib\plugin.js:5:58)
[appium-reporter-plugin] at processTicksAndRejections (node:internal/process/task_queues:95:5)
[appium-reporter-plugin] session: null; cmd getStatus; time appium took for screenshot: 1.84 ms
[debug] [AppiumDriver@b3ae] Encountered internal error running command: TypeError: Cannot read properties of undefined (reading 'split')
[debug] [AppiumDriver@b3ae] at ReportPlugin. (C:\Users\admin.appium\node_modules\appium-reporter-plugin\lib\plugin.js:112:49)
[debug] [AppiumDriver@b3ae] at Generator.next ()
[debug] [AppiumDriver@b3ae] at fulfilled (C:\Users\admin.appium\node_modules\appium-reporter-plugin\lib\plugin.js:5:58)
[debug] [AppiumDriver@b3ae] at processTicksAndRejections (node:internal/process/task_queues:95:5)
[HTTP] <-- GET /status 500 23 ms - 747