• Post Reply Bookmark Topic Watch Topic
  • New Topic

Source of error?  RSS feed

 
Chris Kamara
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello friends,

Beginner to Java here. I have a very statistical background and wanted to leverage my knowledge by learning Java! I need your help.
Currently, running a simple code in command prompt to download Sales for my company's apple app:

java Autoingestion autoingestion.properties 87382198 Sales Daily Summary 20131021


And constantly recieve error "The report you requested is not available at this time. Pleaqse try again in a few minutes."

It is not a maintenance error, as I confirmed this with Apple. Furthermore, the code downloads perfectly from my home laptop. Which leads me to possible conclusion that firewall at work is preventing the running of this code? If it helps, below is the link to the source code, and the error I receive aboive is mentioned in there!

https://github.com/omz/AppSales-Mobile/issues/147

I hope to hear from you soon as this has been wracking my brain all week! Please make me look foolish by solving!

Thanks
 
Steve Luke
Bartender
Posts: 4181
22
IntelliJ IDE Java Python
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Not sure any of us will be able to help, since we don't have access to you apple account or firewall. But:
1) Is there any other error message or output printed to the command line? Or log file?
2) Have you asked whoever made the tool (is it Apple)?
 
Chris Kamara
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you Steve for a promot reply.
The error message is the one in my opening message: "The report you requested is not available at this time. Please try again in a few minutes."

I have called Apple and they inform that it may be a problem my end and to try a different inernet connection. When trying on my personal laptop at home, sure enough, it downloaded very easily.

If you don't know, that totally fine Would you be able to guide me in the right right direction?

Below is an extract from the source code that refers to the error I receive:

if (((HttpsURLConnection)localObject1).getHeaderField("ERRORMSG") != null)
System.out.println(((HttpsURLConnection)localObject1).getHeaderField("ERRORMSG"));
else if (((HttpsURLConnection)localObject1).getHeaderField("filename") != null)
getFile((HttpsURLConnection)localObject1);
}
catch (Exception localException)
{
localException.printStackTrace();
System.out.println("The report you requested is not available at this time. Please try again in a few minutes.");
}
finally
{
if (localObject1 != null) {
((HttpsURLConnection)localObject1).disconnect();
localObject1 = null;
}
}
}



The entire source code is on the link I posed in original message: https://github.com/omz/AppSales-Mobile/issues/147

Thanks again.
 
Campbell Ritchie
Marshal
Posts: 56518
172
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
…and welcome to the Ranch
 
Jesper de Jong
Java Cowboy
Sheriff
Posts: 16057
88
Android IntelliJ IDE Java Scala Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Welcome to the Ranch.

Are you sure the parameters you supply to the program are correct? The following lines from the page you provided a link to give a hint to what parameters the program expects:

Is the username that you intended to use really: autoingestion.properties
And the password: 87382198
And the vnd number: Sales

etc?
 
Karthik Shiraly
Bartender
Posts: 1210
25
Android C++ Java Linux PHP Python
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The first argument in your command line is "autoingestion.properties". But the code in the link is not reading any property file. The code expects first argument to be username and second to be password.
Could it be a mismatch between the binary you're running and the command line documentation you're using? Try by giving username and password as first and second args in command line, instead of the properties file.
 
Steve Luke
Bartender
Posts: 4181
22
IntelliJ IDE Java Python
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Chris Kamara wrote:

See that localException.printStackTrace()? That should print the reason the error occurs. So all you get is the line from System.out.println() and not the printStackTrace()?
 
Chris Kamara
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you all for your replies.

To answer your questions, the 'autoingest.properties' files contains the userID and password. which means the vndnumber is the numerical digits, yes. So the parameters are in the right place. It's interesting that the code works fine off my personal laptop, but not off work laptop.

To the last question, I only obtain the error message, and not, unfortuantely, the printStackTrace.

Contacted Apple and they're convinced it's not an error their end (which makes sense because code works fine off personal laptop), so it might be tight company security. If anyone has any experience of this, please let me know, but I have already contatced my IT department and awaiting their reply. If it turns out to just be an IT problem, then I do apologise if I've wasted anyone's time, but your input does confirm that what I've done over the last week, which is heart-warming, as I've copied the actions you've recommended, so I'm not as bad as I think I am!
 
Stuart A. Burkett
Ranch Hand
Posts: 679
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Chris Kamara wrote:the 'autoingest.properties' files contains the userID and password. which means the vndnumber is the numerical digits, yes. So the parameters are in the right place.

In that case the code you posted a link to is not the code you are running. As has already been said, the linked code is expecting the first two parameters to be the userid and password - it doesn't read anything from a file.
The lack of a stack trace would also seem to confirm this.

Is it possible you are running different versions of the code on your work and home laptops ?
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!