Forum Discussion
- tristaanogreEsteemed Contributor
We need to know a bit more about what's going on inside "openInViewer". I'm guessing here, but I'm thinking that your error reported is being reported inside openInViewer and not in the other code, correct? So... in order to help you debug openInViewer, we need to see that code.
- kmathurOccasional Contributor
Hi
Thanks for the reply. There is nothing wrong in the OpenInViewer code as it executes fine for the first time.
- tristaanogreEsteemed Contributor
kmathur wrote:
Hi
Thanks for the reply. There is nothing wrong in the OpenInViewer code as it executes fine for the first time.
I think you're missing the point.... the point is that there is a method or property being called in OpenInViewer that is failing... We don't know what that is because we don't have the code. While it executes fine the first time, obviously something that is going on in your test process is causing it to fail in subsequent times. Without the code, all we can do is say, "Yup... that's an error."
So... screenshots of the "Additional Info" panel in the error log for the error message, full text of the message from the error log, code from openInViewer and the publish method, and any indication as to what line within openInViewer is generating the error. The problem is not in TC... it's in your code... so we need your code and any relevant information to figure out what's wrong.
- Marsha_RModerator
Well, your "works fine" example is not exactly like your "Next line" example, so we know there is something different happening.
If you try commenting out the "publishFSFromFile" line and run the "Next line" example, does it work without giving the error?
- kmathurOccasional Contributor
Hi
So the original code is using publishFSFromFile method 5 times (I am using it to test different file types). The openInViewer() works fine for the first time and failing after that. I can re order the methods but it always works fine for the first time and then failing.
So here is the complete code
exportService("Shapefile",resultFile);
publishFSFromFile(itemURL,"Shapefile",resultFile);
openInViewer(resultFile);exportService("CSV file",resultFile);
publishFSFromFile(itemURL,"CSV",resultFile)
openInViewer(resultFile);exportService("FGDB",resultFile);
publishFSFromFile(itemURL,"FGDB",resultFile)
openInViewer(resultFile);exportService("GeoJson",resultFile);
publishFSFromFile(itemURL,"GeoJSON",resultFile)
openInViewer(resultFile);So the code works fine for "Shapefile" and fails after that. If I bring "CSV file" part before that, I will execute perfectly for that and fails for "Shapefile"
- tristaanogreEsteemed Contributor
So, again... what is going in on openInViewer? What is going on in your publishFSFromFile? All we can see is the methods your executing... the problem is probably something within one of those two methods or even both in some way... without the code, we can't help debug it.
Related Content
Recent Discussions
- 3 days ago
- 3 days ago
- 7 days ago