Giter VIP home page Giter VIP logo

Comments (37)

raditya26 avatar raditya26 commented on June 9, 2024 15

Error:
Request had an error:${req.status}

I'm having the same problem.

from adobexd-maps.

mkormendy avatar mkormendy commented on June 9, 2024 2

Well I managed to create a pull request with the following features:

  1. Remove default API key and related code
  2. Add user-defined API key implementation
  3. Add application-persistent plugin settings to save JSON and API keys
  4. Minor UI cleanup and fix plugin name casing

@AceGabrielFigueroa, I now see your pull request! Oops, independently working on the same feature but I added some other stuff as well.

from adobexd-maps.

bkbonner avatar bkbonner commented on June 9, 2024 1

So basically the deal is this. It looks like the API key was invalidated, or something else.

if you go to https://developers.google.com/places/web-service/get-api-key you can request your own google maps api key.

Then you can update the plugin apikeys.json file which is located here:

~/Library/Application Support/Adobe/Adobe XD/plugins/

It's located in one of the directories. Edit the file and replace the key with the one you obtain from google and then it works like a champ.

There's nothing wrong with the app, it just doesn't support using his shared key. It probably shouldn't have been shared.

Hope this helps.

from adobexd-maps.

AceGabrielFigueroa avatar AceGabrielFigueroa commented on June 9, 2024 1

From this code snippet found in <~/Library/Application Support/Adobe/Adobe XD/plugins/.../main.js>, it seems you need the Maps Static API.

const url = "https://maps.googleapis.com/maps/api/staticmap?" +
            "center=" + encodeURIComponent(inputValues.location) +
            "&zoom=" + encodeURIComponent(inputValues.zoom) +
            "&size=" + encodeURIComponent(width) + "x" + encodeURIComponent(height) +
            "&scale=2" +
            "&maptype=" + encodeURIComponent(inputValues.mapType) +
            (inputValues.locationPin ? ("&markers=color:red%7C" + encodeURIComponent(inputValues.location)): "") +
            mapStyles +
            "&key=" + encodeURIComponent(apiKey);
  1. Create a new project/use an existing GCP project
  2. Go to the navigation menu on the top left and scroll down to find 'Google Maps'
  3. On the left pane, click on 'APIs'
  4. Find 'Maps Static API' in the 'Additional APIs Table' and click on it
  5. Hit Enable

MAKE SURE BILLING IS ENABLED

Pricing shouldn't be an issue if you are not going over 100,000 request. It starts to bill after $200.00 of requests ($2.00 per 1,000 request).

I would suggest limiting your api & securing it.

More information on billing here.

EDITED: Fixed path, '...' should be the plugin folder, for example 'e1e8f866'.

from adobexd-maps.

Skarnet95 avatar Skarnet95 commented on June 9, 2024 1

i hope quick fix :(

error:${req.status}

from adobexd-maps.

AnilNatarajan avatar AnilNatarajan commented on June 9, 2024

same problem here as well. any solutions?

from adobexd-maps.

alc0der avatar alc0der commented on June 9, 2024

I am having the same porblem

from adobexd-maps.

daniellerivi avatar daniellerivi commented on June 9, 2024

I have the same problem today.
The message appears:
"Error - Request had an erros: ${req.status}"

I'm not finding solutions :(

from adobexd-maps.

daniellerivi avatar daniellerivi commented on June 9, 2024

This is a general problem with the Google API.
In the plugin code.
You need to wait for the plugin owner to fix it.

Let's hope you fix it as soon as possible!

from adobexd-maps.

aimanfakia avatar aimanfakia commented on June 9, 2024

Not working for me either

from adobexd-maps.

skylarcheung avatar skylarcheung commented on June 9, 2024

@bkbonner I've gone into my apiKeys.json file, then replaced their API key with my own. It seems the same error persists, unfortunately. Perhaps I am doing something wrong?

from adobexd-maps.

acorrearojo avatar acorrearojo commented on June 9, 2024

Hi all,

I enabled a Map Static API with a new API KEY for Google MAPS. however still the same error.

Any news about this issue?

Andrés

from adobexd-maps.

AceGabrielFigueroa avatar AceGabrielFigueroa commented on June 9, 2024

Did you replace the API key in the apiKeys.json?

{
    "apiKeys": [
        "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
    ]
}

Replace the X's with your api key generated by gcloud.

Hi all,

I enabled a Map Static API with a new API KEY for Google MAPS. however still the same error.

Any news about this issue?

Andrés

from adobexd-maps.

bkbonner avatar bkbonner commented on June 9, 2024

Sorry, I just saw this msg. Change it as @AceGabrielFigueroa indicated. and restart XD. It worked for me. btw, I'm not a developer on this project, just another user of XD that was interested in this plugin.

Make sure you're changing the apiKeys in the correct directory. I'm not sure XD names plugin directories, so I didn't want to give anyone bad info. Look for the directory with apiKeys.json and the main.js that has the staticmap call.

On the mac, you'd run these two commands:

cd ~/Library/Application\ Support/Adobe/Adobe\ XD/plugins/e1e8f866

this creates a template file (called source.json) for us to use:
echo "{ \"apiKeys\": [ \"XYZ\" ] }" > source.json

you can do an ls source.json and you should see your file. run cat source.json to see the contents.

Then run the following command (but first replace your_api_key in the command below with the key you got on google developer page)

sed 's/XYZ/your_api_key/g' source.json > apiKeys.json

That should work for you.
run rm source.json to clean up the XYZ file.

Hope that helps

from adobexd-maps.

slavajacobson avatar slavajacobson commented on June 9, 2024

Maybe add a Settings field for the API key?

from adobexd-maps.

bkbonner avatar bkbonner commented on June 9, 2024

from adobexd-maps.

mkormendy avatar mkormendy commented on June 9, 2024

Well for those that have fixed it locally for yourself (@bkbonner), why not just push those changes up as a PR to help the author fast-track the completion?

from adobexd-maps.

CSharpGuy2006 avatar CSharpGuy2006 commented on June 9, 2024

Guys, I had the same issue, updated with my API key and still had the same problem. After some troubleshooting, I determined that in my case, I had not set up the billing in Google so the request would return a different error.

So...

  1. Update the API Key with yours
  2. Make sure your billing is set up
  3. Restart XD and try again

If you are still having issues, try to grab the code generated when you style a google map (the api code, plug in your key and paste into a browser window...). Any error returned by the service should appear there.

Hope this helps!

Cheers!

from adobexd-maps.

CJHissle avatar CJHissle commented on June 9, 2024

How would I fix this issue on Windows 10? I'm creating an app for my senior capstone class and can't edit the plugin code. Need help ASAP!

from adobexd-maps.

AceGabrielFigueroa avatar AceGabrielFigueroa commented on June 9, 2024

@CJHissle
According to this article by adobe, your plugin folder location would be located at:
C:\Users\%USERNAME%\AppData\Local\Packages\Adobe.CC.XD_adky2gkssdxte\LocalState\

You would then need to locate the plugins folder and find the correct plugin folder name and edit the code.

I hope that helps. If not, maybe ill make a PR to include an api-key input box. (Quite busy).

from adobexd-maps.

CJHissle avatar CJHissle commented on June 9, 2024

@AceGabrielFigueroa Hey, thanks for the help on finding the plugin location. I used my API key in place of the current one and still getting an error.

from adobexd-maps.

AceGabrielFigueroa avatar AceGabrielFigueroa commented on June 9, 2024

@CJHissle
Did you enable billing on the project? Check if billing was enabled.

  1. Login to Google Cloud Platform.
  2. Make sure you are in the same project that you enabled the static Maps Static API.
    1. If not, change your project by clicking the drop down right next to 'Google Cloud' logo.
  3. On the left side of the top nav bar, click on the hamburger icon.
  4. You should see a drawer open up. Locate Billing and click on it.
  5. If you haven't set a billing account, it should give you an option to link a billing account. You need to link a billing account.

If you are able to send a request but still receive an error, check out this page. This is the error documentation for google static maps.

EDITED
It could be that you messed up the formatting of the json file. It is not space sensitive, but perhaps you are missing an bracket or quote somewhere.

from adobexd-maps.

nms73631 avatar nms73631 commented on June 9, 2024

Same problem here

from adobexd-maps.

CJHissle avatar CJHissle commented on June 9, 2024

Hey guys, finally got it working. Definitely gotta make sure the billing is set up.

from adobexd-maps.

AceGabrielFigueroa avatar AceGabrielFigueroa commented on June 9, 2024

For the code to be more maintainable, yours is more suffice. I only did it within an hour because I was just curious in making plugins. Hopefully the maintainer of this plugin will accept the PR, but he seems to be inactive.

from adobexd-maps.

mkormendy avatar mkormendy commented on June 9, 2024

@boopeshmahendran can you merge my pull request?

from adobexd-maps.

 avatar commented on June 9, 2024

Still the same error

from adobexd-maps.

ashtonbradley45274 avatar ashtonbradley45274 commented on June 9, 2024

So basically the deal is this. It looks like the API key was invalidated, or something else.

if you go to https://developers.google.com/places/web-service/get-api-key you can request your own google maps api key.

Then you can update the plugin apikeys.json file which is located here:

~/Library/Application Support/Adobe/Adobe XD/plugins/

It's located in one of the directories. Edit the file and replace the key with the one you obtain from google and then it works like a champ.

There's nothing wrong with the app, it just doesn't support using his shared key. It probably shouldn't have been shared.

Hope this helps.

I looked into the code and found this as well , I saw a commit that will allow the user to input their own api key , but the pull has not been merged and released.

from adobexd-maps.

Dzivo avatar Dzivo commented on June 9, 2024

Isnt it easier to just add new field to the library so that we can enter our own api key.
I will make pull request in couple of days

from adobexd-maps.

mkormendy avatar mkormendy commented on June 9, 2024

@Dzivo look at my pull request - it’s already done and works. Download my fork of this and overwrite the plugin with the fork’s files.

from adobexd-maps.

mkormendy avatar mkormendy commented on June 9, 2024

Still the same error

@gfreiresantos95 did you use the forked version I created that fixes it?

from adobexd-maps.

mkormendy avatar mkormendy commented on June 9, 2024

@Skarnet95 its been fixed already, have you updated your plugin in XD and followed the steps?

from adobexd-maps.

Skarnet95 avatar Skarnet95 commented on June 9, 2024

@Skarnet95 its been fixed already, have you updated your plugin in XD and followed the steps?

buy API from google is too expensive for me :/

P.S. I hope the program developer will solve this problem himself, maybe with adobe xd developers

from adobexd-maps.

YasserDRIF avatar YasserDRIF commented on June 9, 2024

@Skarnet95 it can't be fixed by the developer because of the changes in the google maps api platform, now each member need to get his own api key and put it as an input so that it works.

from adobexd-maps.

daVinciAngelo avatar daVinciAngelo commented on June 9, 2024

I really wish there was a solution for this, it would seem to be obvious that people need maps!

from adobexd-maps.

karthikruiux avatar karthikruiux commented on June 9, 2024

Hello mates,

I was also getting the same error for so long.
And I have checked the complete plugin code and everything.
And at last, I found the solution.

First of all, check the [static map url] being used in your "main.js" file of your plugin folder.
You can check the correct URL in the below-attached screenshot.

image

And also check API key code written must same as this:

-- "&key=" + encodeURIComponent(inputValues.apiKey);

After all the above part is done and proper, then check your API key by entering your key in the below URL:

https://maps.googleapis.com/maps/api/staticmap?center=Brooklyn+Bridge,New+York,NY&zoom=13&size=600x300&maptype=roadmap&markers=color:blue%7Clabel:S%7C40.702147,-74.015794&markers=color:green%7Clabel:G%7C40.711614,-74.012318&markers=color:red%7Clabel:C%7C40.718217,-73.998284&key=**[YOUR_API_KEY]**

either it is working or not.

And if it is not working and showing a billing error or something.. then directly check the below points.

  1. Check if your Google Map Console billing is enabled or not.
  2. Check if the Static Map API service is enabled or not.

This is what I have done, and mine is working properly now.

from adobexd-maps.

karthikruiux avatar karthikruiux commented on June 9, 2024

@Skarnet95 its been fixed already, have you updated your plugin in XD and followed the steps?

buy API from google is too expensive for me :/

P.S. I hope the program developer will solve this problem himself, maybe with adobe xd developers

You can simply add a credit card (no initial payment needed) and get $200 credits for free to use the static map hits.
And if you are using the map API only to add in your designs it won't go beyond the free credits.

from adobexd-maps.

Related Issues (14)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.