PokemonGoBot icon indicating copy to clipboard operation
PokemonGoBot copied to clipboard

Exception in thread "default" java.io.FileNotFoundException

Open JayZ-98 opened this issue 10 years ago • 18 comments

Description: I've been getting these errors even though my file is a ".properties". Undertow started on port(s) 8080 (http) Exception in thread "default" java.io.FileNotFoundException: config.properties (No such file or directory) at java.io.FileInputStream.open0(Native Method) at java.io.FileInputStream.open(FileInputStream.java:195) at java.io.FileInputStream.(FileInputStream.java:138) at java.io.FileInputStream.(FileInputStream.java:93) at ink.abb.pogo.scraper.MainKt.startDefaultBot(Main.kt:77) at ink.abb.pogo.scraper.PokemonGoBotApplication$BotRunner$run$1.invoke(PokemonGoBotApplication.kt:57) at ink.abb.pogo.scraper.PokemonGoBotApplication$BotRunner$run$1.invoke(PokemonGoBotApplication.kt:46) at kotlin.concurrent.ThreadsKt$thread$thread$1.run(Thread.kt:18)

What should i do to fix this?

JayZ-98 avatar Aug 09 '16 05:08 JayZ-98

  1. Create a new text document
  2. Go to Format > Make Rich Text
  3. Copy the settings from your original config.preferences to the new text document
  4. Save the file

Tom2942 avatar Aug 09 '16 05:08 Tom2942

@Tom2942 i have the same problem. I did as you said and it still did it. Any other tips?

addisonrudd avatar Aug 09 '16 06:08 addisonrudd

check my previous issue, remember to CD to the directory first before launching jar

limyangsern avatar Aug 09 '16 06:08 limyangsern

@limyangsern i did that also. i think. Do you mean typing "cd" then putting the folder in.

addisonrudd avatar Aug 09 '16 06:08 addisonrudd

@addisonrudd Yes, we tend to forget cd to the directory before we launch the jar, and also check if your extension is correct, try to screenshot here

limyangsern avatar Aug 09 '16 06:08 limyangsern

has something to do with the file extension of config.properties see this #889

zoegalaxy avatar Aug 09 '16 07:08 zoegalaxy

Guys, If you want to skip all the typing. create a .bat files and paste the code below.

The code will resolve your directory and run the program directly. :-) Cheers.

@echo off cd %~dp0 echo Changed directory to %~dp0 java -jar PokemonGoBot-0.5.0.jar pause

ChesterChin92 avatar Aug 09 '16 07:08 ChesterChin92

@jabbink I seriously don't believe it has anything to do with paths etc..... This is a server side problem which this program cannot overcome after it happens...

staurakis avatar Aug 09 '16 09:08 staurakis

@staurakis no, its definitely your directory problem, i solved mine, which is same as urs!

limyangsern avatar Aug 09 '16 09:08 limyangsern

screen shot 2016-08-08 at 10 53 43 pm

limyangsern avatar Aug 09 '16 09:08 limyangsern

  1. make sure your extension is correct.
  2. go terminal, type cd [directory]
  3. type java -jar [ur file name]

limyangsern avatar Aug 09 '16 09:08 limyangsern

@limyangsern i am running on a windows machine and i always go and run the program from the directory is in...... I execute it as you suggest (ofcourse) and no i still have the issue....

staurakis avatar Aug 09 '16 09:08 staurakis

check if windows have changed your file to .txt

limyangsern avatar Aug 09 '16 09:08 limyangsern

:) no it is the correct extension.... clipboard03 clipboard02

staurakis avatar Aug 09 '16 09:08 staurakis

as said before, i have replicated the issue. The issue is server side error. The problem is there is code to 'catch' the issue/error and overcome it.... @jabbink

staurakis avatar Aug 09 '16 09:08 staurakis

There is no "server side issue" (there is no "server" from us; only Niantic). You are clearly not running the jar from the directory that also contains your config.properties.

jabbink avatar Aug 09 '16 14:08 jabbink

@jabbink of course. I was referring to Niantic. Secondly, as you can also see from the screen captures above, i am running the jar file frim the same directory as the config file.

staurakis avatar Aug 09 '16 14:08 staurakis

Sorry @jabbink my mistake, i was referring to the authorization issue.

staurakis avatar Aug 09 '16 15:08 staurakis