question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. ItΒ collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

No map resources found in amplify config

See original GitHub issue

Before opening, please confirm:

JavaScript Framework

React

Amplify APIs

Geo

Amplify Categories

geo

Environment information

# Put output below this line
amplify cli version - 4.6.0

npm aws-amplify version - 4.3.0

amplify status - 

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚ Category β”‚ Resource name        β”‚ Operation β”‚ Provider plugin   β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚ Auth     β”‚ demoselready58be52e5 β”‚ No Change β”‚ awscloudformation β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚ Api      β”‚ demoselready         β”‚ No Change β”‚ awscloudformation β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚ Storage  β”‚ demoselreadystorage  β”‚ No Change β”‚ awscloudformation β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚ Function β”‚ createUser           β”‚ No Change β”‚ awscloudformation β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚ Function β”‚ requestResetPassword β”‚ No Change β”‚ awscloudformation β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚ Geo      β”‚ lmsMap               β”‚ No Change β”‚ awscloudformation β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

-- aws-exports.js

"geo": {
        "amazon_location_service": {
            "region": "us-east-1",
            "maps": {
                "items": {
                    "lmsMap-uatenv": {
                        "style": "VectorEsriLightGrayCanvas"
                    },
                    "map32a03f17-uatenv": {
                        "style": "VectorEsriStreets"
                    }
                },
                "default": "map32a03f17-uatenv"
            }
        }
    },

Describe the bug

No map resources found in amplify config, run β€˜amplify add geo’ to create them and ensure to run amplify push after at AmazonLocationServiceProvider._verifyMapResources (AmazonLocationServiceProvider.js:273) at AmazonLocationServiceProvider.getDefaultMap (AmazonLocationServiceProvider.js:113) at GeoClass.getDefaultMap (Geo.js:140) at eval (AmplifyMapLibreRequest.js:105) at Generator.next (<anonymous>) at eval (AmplifyMapLibreRequest.js:14) at new Promise (<anonymous>) at __awaiter (AmplifyMapLibreRequest.js:10) at Function.AmplifyMapLibreRequest.createMapLibreMap (AmplifyMapLibreRequest.js:103) at eval (AmplifyMapLibreRequest.js:113) at Generator.next (<anonymous>) at eval (AmplifyMapLibreRequest.js:14) at new Promise (<anonymous>) at __awaiter (AmplifyMapLibreRequest.js:10) at createMap (AmplifyMapLibreRequest.js:112) at eval (EventMap.tsx:57)

Expected behavior

I am trying to render maps

Reproduction steps

  1. Install aws-amplify
  2. setup geo-map modules
  3. try to render map in DOM

Code Snippet

// Put your code below this line.

Log output

// Put your logs below this line


aws-exports.js

No response

Manual configuration

No response

Additional configuration

No response

Mobile Device

No response

Mobile Operating System

No response

Mobile Browser

No response

Mobile Browser Version

No response

Additional information and screenshots

No response

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:8 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
TreTunacommented, Dec 15, 2021

This may be resolved at this point with newer versions, but we did have some versions where this issue turned up with the most common reasoning being that two versions of @aws-amplify/geo are being installed. You can either look in your node_modules (you may also want to check node_modules/aws-amplify/node_modules and node_modules/maplibre/node_modules) to see if another version is there) or the lock file for whichever package manager you are using, to verify if two versions being installed. If not, can you please let us know what versions for the following packages you have: aws-amplify @aws-amplify/geo maplibre-gl-js-amplify

1reaction
WWJakobcommented, Aug 29, 2022

I am also facing the exact same issue. To me it started when installing new versions of maplibre-gl and maplibre-gl-js-amplify to: β€œmaplibre-gl”: β€œ^2.1.9” β€œmaplibre-gl-js-amplify”: β€œ^2.0.0” from using version that were on ^1.15.3 and ^1.5.0.

I need to upgrade to be able to use GeoFencing. Before the upgrade loading maps worked great.

Trying to remove node_modules and lock file and then doing an npm install don’t help. Still get the same error.

Update Maybe I spoke to soon. Actually when I made sure that the lock file was deleted and all node_modules deleted and then doing npm install I got everything to work again with the updated versions.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Geo - Use existing Amazon Location Service resources
To use your existing Amazon Location Service resources, i.e. maps and place indices, with Amplify Geo, you need to ensure your role has...
Read more >
Add Maps to your App in 3 Steps with AWS Amplify Geo ...
The following command will walk you through some configurations to set up your map. amplify add geo. Bash. Choose to add a map...
Read more >
Take a journey with your own map service by AWS Amplify ...
Tagged with aws, amplify, vue, geolocation. ... transformRequest make a Signed URL for access to the Map resource previously created.
Read more >
New AWS Amplify withAuthenticator error related to maplibre ...
I don't know if the recent changes to aws-amplify caused this new issue or not but bottom line is, it appears that Amplify...
Read more >
amplify-js
Storage.put with resumable turned on has changed the key to no longer include ... from @aws-amplify/core in favor of exporting the functions it...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found