Form upload 404 error in Open Data Kit - odk

I am working on a project and needed to collect data using open data kit. I have created a server using google app engine, but when uploading the form to the aggregate server, I get this error:
sample-Error: Not Found (404) at
http://odkproject- 207015.appspot.com/ODKAggregate/submission?deviceID=imei%3A864898033928120

404 is returned if the form you're submiting is does not exist on the server.
You have to delete all forms and load them back.
Hope it fixes your issue.

Related

React error: request failed with status code 400

I am following Bezkoder tutorial in the link to create a simple CRUD database using React, NodeJS, Express and MySQL: [https://www.bezkoder.com/react-node-express-mysql/#React_Nodejs_Express_MySQL_Architecture
I've successfully created the backend and tested read, write and delete of records using POSTMAN. I've then created the React frontend, which uses Axios - it compiles OK, and displays a web page in my browser. This page will read records from the database OK, but when I try to add new or amend existing records, it doesn't work, and in console it displays "Request Failed with status code 400" error. The full error message in console is as follows:
Console error
I'm not sure what the error means or how I might go about troubleshooting further. Could anyone point out to me how I can troubleshoot this further or what other info you'd need to help me?
I was expecting the React frontend to be able to add new records and amend existing records.

API key doesnt work, still get error code same as if no API key

Using SP Simple Maps module with Joomla 3.
Applied for API, got it, put it in place in module, no problem. But website still shows map as grayed out and error message same as before API:
This page didn't load Google Maps correctly. See the JavaScript console for technical details.
www.222project.com
This is the error I am getting in console in your contact page
Google Maps API error: ApiNotActivatedMapError https://developers.google.com/maps/documentation/javascript/error-messages#api-not-activated-map-error
You have to activate the API from console. Go to Dashboard and you can see the activate option.
There are some changes after June 22, 2016. there are some links that may help you
Google Maps API error: Google Maps API error: ApiNotActivatedMapError
https://superstorefinder.net/support/knowledgebase/google-maps-api-keys-usage-and-limits/
http://superstorefinder.net/support/knowledgebase/new-google-maps-after-22-june-2016-will-require-google-api-key/

How to upload Image into angular js?

How to upload image using object function?
When I upload image with some form elements it gives internal error 500. If I remove file element from form then the data is saved with no error.
This has nothing to do with AngularJS. It is your server failing to be able to process the file in the Request. For example, most common cause is the folder the server tries to put the image in not accessible because of security settings in the web-server.
AngularJS is not raising a 500 error, it has to be Web Server raising that error
Check the logs that the your web-server may have.

Single Page App: Force Users to Log Out or Refresh

I have created a single page app using AngularJS and ASP.NET MVC 3. When deploying a new version of the application, it's possible for users to be already logged in as the application is being updated. If these users don't either refresh their browser or log out and back in again to get the new JavaScript files, they will encounter lots of errors and could potentially create invalid data.
Question: in a single page app, is there an elegant way to either prompt users to either refresh their browser or log out and back in again?
I suppose this would be possible through Web Sockets / SignalR, but are there other options?
One generic way I could see is to have your angular app send a client-version # with any http request, and your .NET side watch for that number and when it's out of date ( a newer version has been deployed ) send an error response which you would capture in your angular app. You could then just trigger a refresh or prompt the user to refresh and get the latest version.

Google_AuthException : invalid_grant

I'm trying to setup the config.php with my values but I get this fatal error:
Fatal error: Uncaught exception 'Google_AuthException' with message 'Error fetching OAuth2 access token, message: 'invalid_grant'.
I entered the client ID, secret, simple API key, location and sqlite database as the documentation says here:
https://developers.google.com/glass/quickstart/php
Any idea of what I'm doing wrong?
Thanks in advance!
This happens when the URL where you're hosting your Glassware is not listed as a valid OAuth 2.0 redirect URI on the API console. Follow these steps to resolve it.
First, determine your OAuth 2.0 redirect URI. This is where traffic goes at the end of the OAuth dance. The correct value depends on where you're running the php quick start. If you're running it on a local web server, it's likely to be http://localhost/mirror-quickstart-php/oauth2callback.php. If you're running it on example.com, it might be https://example.com/oauth2callback.php.
Go to the API console. This link will lead you to the right panel (services), but double check that you're on the correct project.
Scrolling down you should see a section of the page that looks like this: . Click on 'Edit Settings...'.
This triggers a pop-up where you can enter your OAuth redirect URIs. Add your redirect URI to the top text area. Make sure to put each URI on its own line.
Reload the page for the PHP Quick Start and everything should work.
If you're still having an issue, please share the full error message on the page and the value you have for the base url in config.php.
If you're getting the invalid_grant error from Google : Instead of using the client ID from google developer console as your value for client ID in the code, try using the email address value from developer console. This is actually what they expect. So, to confirm - the value for Client ID should be the value from developer console ending #developer.gserviceaccount.com
Had similar problem in Windows PS dotnet environment when trying to connect to DialogFlow Google Cloud Project recently and it appeared to be intermittent fault but it turned out to be global $env:GOOGLE_APPLICATION_CREDENTIALS in windows PowerShell was pointing to a key file set when first setup access to GCloud days before and since regenereated keys in GCP Console
After generating new key file and setting it with new generated key file using $env:GOOGLE_APPLICATION_CREDENTIALS="[Path_To_JSON_Key_File]" the problem went away but fix only lasted as long as the window was open, then after a while ran $env:GOOGLE_APPLICATION_CREDENTIALS on a newly opened PS window and noticed it was still pointing to the old key file!
setting the system environment variable GOOGLE_APPLICATION_CREDENTIALS to the value of [Path_To_JSON_New_Key_File] fixed it, all newly opened PS windows had the correct key file and authenticated correctly using Service Account and .Net Google Cloud API calls worked after that

Resources