cloudendpoints / endpoints-java

A Java framework for building RESTful APIs on Google App Engine
Apache License 2.0
32 stars 35 forks source link

InconsistentApiConfigurationException (Differing property: issuers) with Endpoints V2 #29

Closed Burtan closed 7 years ago

Burtan commented 7 years ago

Hi, I'm refering to this bug. So I tried to use the workaround described and changed my API from

@Api( name = "myApi", version = "v1", namespace = @ApiNamespace( ownerDomain = Constants.API_OWNER, ownerName = Constants.API_OWNER, packagePath = Constants.API_PACKAGE_PATH ) )

to

@Api( name = "myApi", version = "v1", namespace = @ApiNamespace( ownerDomain = Constants.API_OWNER, ownerName = Constants.API_OWNER, packagePath = Constants.API_PACKAGE_PATH ), issuers = { @ApiIssuer( name = Constant.GOOGLE_ID_TOKEN_NAME, issuer = "accounts.google.com", jwksUri = "https://www.googleapis.com/oauth2/v1/certs") } )

Now I get the error:

Multiple entries with same key: google_id_token=com.google.api.server.spi.config.model.ApiIssuerConfigs$IssuerConfig@ee02217 and google_id_token=com.google.api.server.spi.config.model.ApiIssuerConfigs$IssuerConfig@7f462ec9

tangiel commented 7 years ago

Hello, that bug should no longer be an issue, so you shouldn't need to workaround it. Please try the latest beta version (11).

Burtan commented 7 years ago

I've upgraded to beta 11 but it seems my problem has something to do with the new gradle endpoints plugin. When I add the plugin, I get the error message. Without adding it, appengineRun works fine (the new appengine plugin). Should I create a new issue in the new endpoints plugin repo?

Burtan commented 7 years ago

The new appengine plugin still uses beta-9. I guess thats the problem.