Skip to content

Commit 7ee25a2

Browse files
docs: Add troubleshooting section (#1808)
1 parent 2250ea5 commit 7ee25a2

File tree

2 files changed

+27
-91
lines changed

2 files changed

+27
-91
lines changed

README.md

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -200,6 +200,33 @@ Check the corresponding driver's READMEs to know the list of capabilities and fe
200200
You could find much more code examples by checking client's
201201
[unit and integration tests](src/test/java/io/appium/java_client).
202202

203+
## Troubleshooting
204+
205+
### InaccessibleObjectException is thrown in runtime if Java 16+ is used
206+
207+
Appium Java client uses reflective access to private members of other modules
208+
to ensure proper functionality of several features, like Page Object model.
209+
If you get a runtime exception and `InaccessibleObjectException` is present in
210+
the stacktrace, and your Java runtime is at version 16 or higher, then consider following
211+
[Oracle's tutorial](https://docs.oracle.com/en/java/javase/16/migrate/migrating-jdk-8-later-jdk-releases.html#GUID-7BB28E4D-99B3-4078-BDC4-FC24180CE82B)
212+
and/or checking [existing issues](https://github.com/appium/java-client/search?q=InaccessibleObjectException&type=issues)
213+
for possible solutions. Basically, the idea there would be to explicitly allow
214+
access for particular modules using `--add-exports/--add-opens` command line arguments.
215+
216+
Another possible, but weakly advised solution, would be to downgrade Java to
217+
version 15 or lower.
218+
219+
### Issues related to environment variables presence or to their values
220+
221+
Such issues are usually the case when Appium server is started directly from your
222+
framework code rather than run separately by a script or manually. Depending
223+
on the way the server process is started it may or may not inherit the currently
224+
active shell environment. That is why you may still receive errors about variables
225+
presence even though these variables ar actually defined for your command line interpreter.
226+
Again, there is no universal solution to that, as there are many ways to spin up a new
227+
server process. Consider checking the [Appium Environment Troubleshooting](docs/environment.md)
228+
document for more information on how to debug and fix process environment issues.
229+
203230
## Changelog
204231
*8.2.1*
205232
- **[ENHANCEMENTS]**

docs/Installing-the-project.md

Lines changed: 0 additions & 91 deletions
This file was deleted.

0 commit comments

Comments
 (0)