Select to view content in your preferred language

Hosted Feature Layer Error: There was an error publishing the service.

8535
25
12-05-2022 01:19 AM
OliviaIldefonso
Emerging Contributor

Hi all,

I'm having a reoccurring error that I'm hoping one of you very bright people could help me to resolve. I have a couple of excel spreadsheets that don't have location data that I've converted into hosted feature layers so that I can use them for dashboards. Everything normally works well, until down the road come the time when I want to update the data. When I try access the hosted feature layer to see and update the data, I get this error message that says "There was an error publishing the service." And I'm unable to access the data, even though the dashboard that was created with it is still working (for example, https://commonpurpose.maps.arcgis.com/apps/dashboards/4520200d62ef4316a74e41719bfa7222). This is a big problem for me because I need to be able to update the data annually. I've attached a spreadsheet of the current dataset thats giving me this error (an extremely simple dataset nonetheless, which makes this even more confusing), and a screenshot of the error message.

Thanks so much in advance for your help and support!

Olivia

25 Replies
jcarlson
MVP Esteemed Contributor

I hate to say it, but I don't get that error when I try publishing the same spreadsheet:

jcarlson_0-1670251139522.png

If something were causing issues, I'd guess it to be the empty cells in the bottom row. Null integers can throw errors in certain cases. Do you still see this error if you put 0s into the empty cells?

- Josh Carlson
Kendall County GIS
0 Kudos
DanielMiranda2
Regular Contributor

Are you able to see and update the data immediately after adding the table to ArcGIS Online? Or is it only later on when you try to update it?

 

The only thing that stands out to me on your xlsx is in the "All New Bedford" row, the school and join key fields are merged. Maybe that is causing a problem? I would first try to unmerge those rows and if All New Bedford does not have a join key, to just leave that cell blank.

0 Kudos
jcarlson
MVP Esteemed Contributor

I thought that, too, but it's only how the sheet is rendering here on the Community. If you download the file, it's not merged.

- Josh Carlson
Kendall County GIS
0 Kudos
OliviaIldefonso
Emerging Contributor

Thank you both so much for engaging with my question and for your help!

@jcarlsonI'm unfortunately not able to put 0s in the All New Bedford row to see is that would help because it wont let me see the data at all. It just shows the error.

And @DanielMiranda2 I'm able to see the data and build out he dashboards initially. The error typically comes days or weeks later when I need to go back to the data to update something. Its then that I get this error. And this has already happened to me a few times with other hosted feature layers.

Could it be a problem that I dont have location data in the spreadsheet?

0 Kudos
OliviaIldefonso
Emerging Contributor

 @jcarlson if the issue is that I have empty cells rather than 0s this presents an interesting problem because for the datasets Im working with 0 typically means that the cell has a value and its 0, as opposed to instances when there are no values, for example, because the population is too small so a value cant be given because of privacy concerns. So if ArcGIS Online wants me to always have a value, and not be able to put in NULL or NA (because we know it doesnt like to mix up field types), then Im not sure how Id be able to make that necessary distinction. Thoughts?

0 Kudos
jcarlson
MVP Esteemed Contributor

Yeah, I wondered if the null / 0 thing would cause statistical problems.

Even though you won't be working with fractional values, setting the field type to a decimal / double would allow nulls. Also, it's not surprising that the update process is giving you problems. I've also had issues with null integers during updates, and I believe it's got something to do with one of the backend processes that you unfortunately don't have any access to change.

The lack of spatial information in the spreadsheet could be part of it. Are you using the spreadsheet to update a spatial layer?

I'd suggest looking into alternate means of updating your features. Is this spreadsheet the extent of it, or do you anticipate having a large number of rows or frequent updates? It may simply be easier to edit the table by hand if it's small and infrequent.

If you want it automated, the Python API can edit your features in place, even when the source data doesn't have spatial attributes.

- Josh Carlson
Kendall County GIS
0 Kudos
OliviaIldefonso
Emerging Contributor

Oh thats really helpful to know that setting the field type to a single or double would allow nulls. Thanks for sharing that!

I'm not using the table for a join or any spatial analysis, Im using it (and similar spreadsheets) to create the dashboards that go into this story map (https://arcg.is/11THyX0).

Since Ill only need to update the data twice a year, I plan on updating the table manually using the "update data"-->"append data to layer" feature, but unfortunately that isn't an option when the error is displayed.

0 Kudos
TBWI
by
Occasional Contributor

I also have the same issue with a table for my dashboard. It was working for weeks, but now I can't access the data table to update my metrics for a serial chart. The data tab has disappeared. Any advice is appreciated. 

SamanthaEarnest1
Occasional Contributor

Hi, I am hoping to find a solution to this too. I am having the same issue. The file works great for awhile, but then all of sudden it gives this same error "There was an error publishing the service." I was doing the same thing as you were, attempting to go back and edit the data. The first time this happened, I was still editing the data for the first time. I assumed I'd done something wrong and deleted the whole thing and started over. This time, the data is complete and has been working for several weeks, but now is throwing that error. It's extremely frustrating and Google has been no help.