POST
|
Shut everything down and restarted web appbuilder. Pressed the edit application button to make sure it still ran. Clear as day in the console log, it says (edited to remove timestamp and full directory path that's specific to my box): [DEBUG] utils - copy client\stemapp\widgets\Search Anyone know why it's doing this? Maybe some widget requires it as a pre-requisite? How would I know which widget that is?
... View more
04-13-2018
10:49 AM
|
0
|
0
|
266
|
POST
|
I started off a web appbuilder application using standard widgets. I later cloned those widgets and created new widgets with new names. I then removed the std widgets and added the new widgets to the application. I run the app in the developer web appbuilder and it works fine. I then download the application to build the zip file I can use to deploy with. That's when things get weird. The download file has both the original standard widgets and my new widgets in it. I don't know where the original standard widgets are coming from. The original widgets are NOT in directories configs or widgets directories in the server\apps\(app#)\ folder. Only the new widgets are there. They are NOT mentioned in the server\apps\(app#)\config.json file. Only the new widgets are mentioned. The two widgets being surreptitiously added are the AddData and the Search widgets. Plus, in the master config.json file it puts in the zip file, it "forgets" to include a reference to a few widget-specific config files that are clearly present in the master config.json file in my server\apps\(app#)\config.json file. In addition, one of the widget-specific config files is an old version that simply is not in the application folder. Anyone have any ideas?
... View more
04-13-2018
08:05 AM
|
0
|
1
|
526
|
POST
|
Updated the portal's version of web appbuilder (as opposed to the stand-alone web appbuilder tool I posted about above) to use the same code snippet. Placed it at the bottom of the Filter widget's startup method. Worked like a champ. (Also made sure I made a list of the changes so when they get overwritten by a new Portal version, I'll know what changes need to be investigated and potentially re-applied.)
... View more
04-04-2018
11:17 AM
|
0
|
0
|
981
|
POST
|
Great workaround! We ran into this problem in web appbuilder's Filter widget. You saved us many hours of figuring out what was wrong and how to go about fixing it. I put this in the filter widget's widget.js file at the bottom of the postCreate method and it worked like a champ: for (var i = 0; i < this.map.layerIds.length; i++) {
this.map.getLayer(this.map.layerIds).on('update-start', function (evt) {
try {
if (evt.target._params) {
if (evt.target._params.layerDefs) {
if (evt.target._params.layerDefs.charAt(0) != '{') {
//if not json syntax, convert
evt.target._params.layerDefs = '{' + evt.target._params.layerDefs.split(':').join(':"').split(';').join('",') + '"' + '}';
}
}
}
}
catch (err) {
// haven't figured out what to do here...
}
});
this.map.getLayer(this.map.layerIds).refresh();
};
... View more
04-04-2018
07:14 AM
|
0
|
1
|
981
|
IDEA
|
Nick, An alternative option would be to intercept the widget code when it starts up. During the off season (which your code would determine at run time), it would alter the config information the widget places in memory after it checks the config file. I do something similar with the edit and export widgets, except in reverse, so I know this is possible. I add data to the config variable in memory to allow exporting and editing of layers added at run time. Or, just save the config file for that widget when it's blank and when it's filled in. Replace the file on the server with the version you want when the season changes. Simpler, but you have to remember to do it, unlike the first suggestion I gave.
... View more
03-05-2018
01:22 PM
|
0
|
0
|
205
|
IDEA
|
Nick, An alternative option would be to intercept the widget code when it starts up. During the off season (which your code would determine at run time), it would alter the config information the widget places in memory after it checks the config file. I do something similar with the edit and export widgets, except in reverse, so I know this is possible. I add data to the config variable in memory to allow exporting and editing of layers added at run time. Or, just save the config file for that widget when it's blank and when it's filled in. Replace the file on the server with the version you want when the season changes. Simpler, but you have to remember to do it, unlike the first suggestion I gave.
... View more
03-05-2018
01:22 PM
|
0
|
0
|
338
|
POST
|
This is the only useful part I noticed: c:\program files\arcgis\server\arcpy\hostedgp\__init__.py ", line 46, in __init__ raise GPCloudExec("HostedGP", unicode(err).encode('utf-8')) I don't have an xml editor on the machine I'm reading this on, so it would be easy to miss something else. It looks like the error may be line 46 of the above file. Perhaps you can look there and see if it becomes more obvious. If not, perhaps you can add some diagnostic code to it to display additional values for you to check out. There are some MessageCode and MessageType values scattered about in the log file, its possible those values may be useful while investigating the python script. Best of luck!
... View more
09-26-2017
10:53 AM
|
0
|
0
|
1960
|
POST
|
I don't know what to do about it either other than back up the entire app before I make any change that requires the save button to be pushed. The first time this happened to me I only lost a few hours of work. It could have been a whole lot worse. It's so totally unexpected to have an application go into wholesale "delete code mode" when you press "Save" that I wanted to get this info out there.
... View more
08-30-2017
08:23 AM
|
0
|
0
|
501
|
POST
|
I do! I ran across his post awhile back and have been following his good advice since. It's possible that today's problem was triggered by a typo in the changes to the custom template I started with. I re-did the template copy / modify step 1&2 twice before it worked. But I've had this problem crop up in the past when I've added a plain vanilla, out of the ESRI box widget to my app, so it's not the only possible trigger.
... View more
08-30-2017
07:41 AM
|
0
|
3
|
501
|
POST
|
I've learned that I need to back up the app I'm working on before I make any changes that will require me to press the SAVE button. That's because it will occasionally throw away all the widgets in the app and delete their code. Today, I started up web appbuilder. Opened up my app and added a widget to it, then pressed save. It just happened deleted code again. Here's what the relevant console log shows, less the date time stamps and the true server and custom widget names: ...................Repository items refreshed................. [INFO] server - Portal https://myUrl.com/arcgis uses web-tier authorization. [INFO] server - Set isXT = true; /webappbuilder/stemapp/env.js [INFO] server - Set isXT = true; /webappbuilder/apps/2/env.js [DEBUG] utils - copy D:\esri_webappbuilder_2\client\stemapp\widgets\myCustomWidget3 [INFO] app - remove widget AddData from app 2 [INFO] app - remove widget BasemapGallery from app 2 [INFO] app - remove widget Measurement from app 2 [INFO] app - remove widget myCustomWidget1 from app 2 [INFO] app - remove widget myCustomWidget2 from app 2 [INFO] app - remove widget myCustomWidget3 from app 2 [INFO] server - Portal https://myUrl.com/arcgis uses web-tier authorization. [INFO] server - Set isXT = true; /webappbuilder/stemap/env.js Because of this behavior, I've learned to back up the app before I add a widget or change the basemap, etc. This is an especially pernicious defect because if you're in the midst of writing a custom widget in your app, it literally deletes the widget code from the app!
... View more
08-30-2017
06:05 AM
|
0
|
6
|
989
|
POST
|
I can't help with a work-around, but I can help others more quickly find out "why" the export is failing. I wrote up an explanation in a reply to another problem getting the extract to work at https://community.esri.com/thread/185088-using-the-spatial-analysis-service-extract-data-feature .
... View more
08-24-2017
11:30 AM
|
0
|
0
|
429
|
POST
|
In our case, the gis analysts had altered the layer names in the portal "service" to be different from the layer names in the underlying web service. Once we made the layer names match in both places, it worked like a charm.
... View more
08-24-2017
11:25 AM
|
1
|
2
|
1960
|
POST
|
This is probably a bit late to help the original poster, but it might help someone else. (It certainly would have helped me!) I was trying to export data using the Analysis Widget in Web AppBuilder. I got the same message code but our text just said "Extract data failed." We have a federated portal and web server. I staged the app to be ready to submit a request to extract the data and then I pressed F12 on the IE browser to get the debug helper window. (Other browsers have similar features, adjust as appropriate.) I turned on the monitor to report on network traffic from and to the browser. I looked for the Post command that requested the extract and saw that the extract job had been submitted successfully. I then looked for the Get command and checked its response. The response message text was equally uninformative (but in other circumstances might not be). However, it also had a JOB ID field. That info was golden, as you'll see in a bit. I then went to our esri webserver to the gis administrator page. I picked the SITE tab and then the DIRECTORIES tab. This gave me a list of directories to look into. In my case, the directory for JOBS turned out to be useful. It appears that all the tools that accept jobs have their own directory. In this case, it was the SYSTEM/SpatialAnalysisTools_GPServer file directory that was of interest. I noticed a bunch of file folders inside that directory with gibberish alpha-numeric names. It turns out the file folders are named for the JOB ID! Inside that jobs folder was a SCRATCH folder. I found a MESSAGES.XML file that turned out to be a more detailed log of the extract job. It pointed us to the python script that was failing, to the line number of the error, and gave us a more useful error message than "ExtractData Failed." We're still tracking down what the exact problem is, but now we've got a clue. (I'll post back if/when we find the solution.)
... View more
08-24-2017
10:36 AM
|
3
|
3
|
1960
|
POST
|
Apparently when an ESRI webserver is federated to an ESRI GIS portal, the portal takes over security behind the scenes. So I'm downloading the .Net DLLs so I can try getting and sending a token.
... View more
07-31-2017
12:35 PM
|
0
|
0
|
415
|
Title | Kudos | Posted |
---|---|---|
1 | 03-03-2017 10:52 AM | |
1 | 04-04-2017 07:55 AM | |
1 | 04-04-2017 06:41 AM | |
1 | 04-24-2017 04:55 AM | |
1 | 06-28-2017 06:35 AM |
Online Status |
Offline
|
Date Last Visited |
11-11-2020
02:23 AM
|