Access server files with ArcGIS javascript api - javascript

I have a geoprocessing service that takes two parameters: netCDF (file) and Date (str). I'm working off of the demo found here.
The issue I have is getting the netCDF file to the geoprocessing service. By creating an upload feature I can see how I would be able to provide the needed parameter but I already have all the necessary files server side.
How can I get my web application to read local netCDF data into the geoprocessing service?
Any suggestions would be greatly appreciated.
My testing application can be found here.
Service: http://sroarcgis.ducks.org/ducksunlimited/rest/services/wsi_tool/GPServer
I receiver the error message: Error {code: 400, message: "Invalid or missing input parameters.", details: Array[0], log: undefined, httpCode: 400}
Thanks!

I'm not sure if this applies to your geoprocess, but I got this same error message and I finally fixed my problem:
Make sure you have the same fields in the search results as you have in the table the search is linked to.
It was a simple fix that took me awhile to find (as these things usually go). I had included a field that was visible in other tables, but that I had had turned off in this table before publishing the map.
Hope this helps!

After speaking with ESRI support they said that I would need to enable uploads on my web server, then upload each file individually.

Regarding your "Invalid or missing input parameters." error, you may be able to resolve this error using the following steps:
Log into ArcCatalog
Create a database connection as the user who is the owner of the table.
Select the table in the Catalog Tree.
Click the Preview tab. (Not sure if this step is really needed, but it will confirm that the metadata was refreshed properly.)
This error can crop up if the table columns change in some way. I think this process refreshes the SDE Metadata associated with the table.

Related

Unable to fetch user data by using tiktok-scraper npm package

I have used tiktok-scraper for getting any public TikTok users data. It was working fine recently and I was able to get the required data but suddenly it stopped working and started giving this error:
Error: Can't extract user metadata from the HTML page. Make sure that the user does exist and try to use proxy
The module that I have used is .getUserProfileInfo('USERNAME', options) without using any options. Earlier I was able to get user details by just passing the username.
Someone has suggested to try using the cookie "sessionid_ss" in the sessionList option but I don't know where can I get this value from.
It would be great if someone can guide in this regard to get any public TikTok users' details based on the username.

error when I try to fetch calendar events through google API, JS React

For some reason; I get error when trying to get my calendar events through google API. I code in JS and use React and have no idea why it does not work.
I have the token stored in sessionStorage and do get personal information about the user like name email and such stuff but I cannot proceed and get the calendar events. Please help!
I'm not sure what exactly you would like to see inside my App but let me know and I'll provide with the stuff because I do not want to upload the whole project lol
https://gyazo.com/37433e19f07e441adf368d1bbcad78e6
Maybe try to return res.send as you use async/await and it returns promise
I changed the structure of the app and I do now receive cal events when I hit one of my endpoints, but receiving other kind of error now, anyway this one can be closed.
Cross-origin request blocked, origin 'null' no access

Firebase console is not showing updated data

I am writing data to Firebase using the following code:
firebase.database().ref('cards/1').set({
val:1
});
I then retrieve the data using the following code:
firebase.database().ref('cards/1').once('value').then(function(snapshot) {
console.info('Getting value from database:')
console.info(snapshot)
})
The code above works fine and is displaying correct result. However firebase console is not reflecting the update. I even tried logging out and back in. What am I doing wrong?
Didn't work for me either.
But to get latest logs, run this command in your terminal: firebase functions:log
You can see the updated logs.
I had the same problem, my documents were not showing in Firebase Console.
According to the Usage and billing page:
The resources available to you in the plans are capped. If your
project exceeds a limit, services may be disabled for that product.
After I upgraded, it started working again.
This could be because you have reached your daily quota.
If you click on the 'billing and quota usage' link on your Usage Over Time you can check if you have reached your quota.
I had the same problem, although I was using Firebase on Android. My issue was that for some reason, the SDK was providing me with an instance set in another location from the one I specified during the setup. To solve this, I had to provide the URL of the database, got the right reference from there, and the data was being updated.

How to parse error with Square Connect API example (Node)

I am trying to learn how to process payments with Square, and am trying to run their examples from GitHub to get a feel regarding how to structure the payments application. I built the node example from here: https://github.com/square/connect-api-examples/tree/master/connect-examples/v2/node_payment using npm install and npm build to get the app up and running.
I am using "4532759734545858" for the card number, "123" for CVV, "0120" for expiration, and "94103" for the zip. I got the card number from here: https://docs.connect.squareup.com/articles/using-sandbox where it states that this is a good number to use for a Visa sandbox.
Also, I have updated the config.json with properties from my developer settings.
When trying to process a payment a get a DOM element that says "Card Declined" without further specifying the error. Is there something I can do to parse the error?
Based on the documentation at: https://docs.connect.squareup.com/articles/using-sandbox#generatingerrorstates it seems the amount_money field of the request is not being populated, but I am having trouble confirming.
Ideally I would like to get to a point where I can add a card as a hash value to my db and use it for recurring billing...
That "card declined" message is actually the error you get back from Square's APIs. You can play around with the error messaging in the app.js file and the `error.jade. Try error.catagory, code, detail.
Keep in mind that this is just a sample app, to show that you can use the APIs with node.js, you probably don't want to use this code in your production system.

Dropbox Drop-In Saver not working: Received non-200 response status 503 from server

I am currently working on a small private project which allows me to upload pictures to a website. A feature which I want to implement is to allow visitors to easily add the images to their Dropbox.
Because this is only a minor feature, I do not wish to implement the full-blown Dropbox-API, and after a bit of research I found the Dropbox Drop-Ins, which seem to be exactly what I was looking for.
I have implemented this after the instructions from the Dropbox-Site: https://www.dropbox.com/developers/dropins/saver#javascript
I use the following code to add my images to the Dropbox:
Dropbox.save({
files: dbFiles,
success: function() {dropboxSuccess();},
progress: function(progress) {dropboxProgress(progress);},
cancel: function() {dropboxCancel();},
error: function(errmsg) {dropboxError(errmsg);}
});
where dbFiles is a simple array with the neccessary objects.
Basically, I think that it is working: A popup appears where I have to login or, if I'm logged in, choose a location in my Dropbox to add the pictures.
However, the following error gets thrown shortly after:
"Received non-200 response status 503 from server"
This is all information that is returned!
I have tried a lot of things, but nothings helps.
Here is the page where I implemented it:
http://thetrip.fnovy.com/dropbox.php
Errors get logged to the console.
I couldn't find any information regarding errors for this Drop-Ins, neither at the Dropbox-Site nor via search engines.
Double-check your URLs and how they're being redirected. For example, the first URL on your page, http://phototrip.fnovy.com/uploads/images/2013-08-12_Test_File.png, is responding with a 302 redirect to http://phototrip.fnovy.comuploads/images/2013-08-12_Test_File.png, which is, naturally, not resolving. :-)
I believe that the 503 is a somewhat misleading interpretation of the real problem, which is that the domain doesn't resolve. I'll update this answer if I learn more about that.
EDIT Confirmed that you see a 503 when the domain doesn't exist. We may be able to give a clearer error message for that, and I also hope we can give the URL in the error message so it's easier to see which URL is causing the problem. Thanks for pointing this out.

Categories

Resources