google-app-engine,polymer,google-cloud-endpoints , Polymer & google cloud endpoints golang backend

Polymer & google cloud endpoints golang backend


Tag: google-app-engine,polymer,google-cloud-endpoints

I'm trying to get my google cloud endpoint from polymer 1.0 all is set and working (backend and dispatcher on appengine), but the google-api-loader/google-client-loader (Tried both) refuses to acknowledge my endpoint, with google-api-loader nothing happens ready event never triggers, with google-client-loader it does but tries to get this url:

Which has all google global apis, not the one from my endpoint.


<polymer-element name="job-service" attributes="jobs">                                                                                                                                                             
        <google-api-loader id="api" name="jobs" version="v1" appId="MyAppID" apiRoot="http://localhost:8082/_ah/api" root="http://localhost:8082/_ah/api">                                                                                                                                                               
        is: 'job-service',                                                                                                                                                                                         
        ready: function() {                                                                                                                                                                                        
            var setJobs = (function(data) {                                                                                                                                                                        

            this.$.api.addEventListener('google-api-load', (function() {                                                                                                                                           
                this.api = this.$.api.api;                                                                                                                                                                         

Tried updating google-apis to master nothing changed.

This is my bower.json:

  "name": "polymer-project",
  "dependencies": {
    "paper-header-panel": "PolymerElements/paper-header-panel#^1.0.0",
    "paper-item": "PolymerElements/paper-item#^1.0.0",
    "google-apis": "GoogleWebComponents/google-apis#master",
    "paper-icon-button": "PolymerElements/paper-icon-button#^1.0.0"



Some notes:

google-client-loader is the one you want

Until a new release you will have to depend on #master (as you are doing already) since the root/apiRoot fix hasn't been released yet .

With Polymer 1.0 camel-cased attributes become lowercase so passing in apiRoot would actually be an apirootproperty. What you want is to set api-root and/or app-id instead (yeah I know that part is confusing..., see Migration Guide)

   id="api" name="jobs" version="v1"
   app-id="MyAppID" api-root="http://localhost:8082/_ah/api">

app-id won't be used though as long as api-root is set. Once you deploy this to your server you would have to remove api-root

Your code is still Polymer <0.6 and not Polymer 1.0 (unless you copied some old code). It should look like this (see Migration Guide):

<dom-module id="job-service">

    is: 'job-service',


How can you get the Google+ Profile of the current user when using Google Cloud Endpoint's (Java) built in authentication?

My Setup Backend: Google App Engine (Java) w/ Google Cloud Endpoints using Endpoint's built in authentication Frontend: AngularJS web app Problem I need to get the Google+ profile for my users. The keyword "me" can generally be used to get the current user's Google+ profile, however since all the authentication,...

Polymer 1.0 services issue

I'm working on a reddit client using polymer to check out web compoments technologies. I started with the 0.5 version and got back on this project recently. That when I found out that polymer had the 1.0 released so I started over (as it wasn't that advanced anyway). I have...

Binding imperatively

Is there a way to set up bindings imperatively. An example use case: var el2 = new MyElement(); el2.myProp = this.$.anotherElement.anotherProp That won't setup a binding, it just assigns the value or object. I'd like to find a way to do something like: el2.myProp.bindTo(this.$.anotherElement.anotherProp) Possible?...

Polymer 1.0: Two-way bindings with input elements

Code Consider the following Polymer custom element: <dom-module id="test-element"> <template> <input type="text" value="{{value}}"> <button>Reset</button> </template> <script> Polymer({ is: 'test-element', properties: { 'value': { type: String, reflectToAttribute: true, notify: true, value: null } } }); </script> </dom-module> I use this custom element in my index.html as follows: <html> <head> <script type="text/javascript"...

Polymer 1.0 data binding not working

I have the following polymer element: The value of navigator.currentStep is not updating after someMethod is called. <dom-module id="m"> <template> Navigator step = <span>{{navigator.currentStep}}</span> </template> </dom-module> Polymer({ is: 'm', ready: function() { this.navigator = new Navigator(1); console.log(this.navigator.currentStep); // 1 }, someMethod: function() {; console.log(this.navigator.currentStep); // 2 } }); Output...

How can I access item in parent repeat template while in filter

<iron-pages> <template is="dom-repeat" items="{{fruit_categories}}" as="category"> <div> <template is="dom-repeat" items="{{all_fruits}}" as="fruit" filter="isThisFruitInTheRightCategory"> <!-- Some more stuff --> <span>{{fruit.weight}}</span> <span>{{fruit.age}}</span> <!-- ... --> </template> </div> </template> </iron-pages> isThisFruitInTheRightCategory: function(fruit){ return fruit.category === /* Q: How do I get the current category? */ } Suppose I...

App Engine - NDB query with projection requires subproperty?

I have the following objects: class Address(ndb.Model): type = ndb.StringProperty() # E.g., 'home', 'work' street = ndb.StringProperty() city = ndb.StringProperty() class Friend(ndb.Model): first_name = ndb.StringProperty() # E.g., 'home', 'work' last_name = ndb.StringProperty() class Contact(ndb.Model): name = ndb.StringProperty() addresses = ndb.StructuredProperty(Address, repeated=True) friends = ndb.StructuredProperty(Friend, repeated=True) And now to optimize the...

GAE webapp2 delete all UserTokens (drop all sessios) for specific user

I want to drop all user sessions when user resets his password, but I can't find a way to do that. My idea was to get all UserTokens of the specific user and delete them, but it seems impossible, because of user = model.StringProperty(required=True, indexed=False) in UserToken model Any ideas...

Trying to download a file using Dropbox Java API in the GAE

I have an XML file on Dropbox that I want to access from my Google App Engine using the Dropbox Java API. After a bit of playing around I find the GAE doesn't support FileOutputStream. FileOutputStream outputStream = new FileOutputStream("myFile.txt"); try { DbxEntry.File downloadedFile = client.getFile("/myFile.txt", null, outputStream); System.out.println("Metadata: "...

Sending mail by Unauthorised sender in Google AppEngine

I've got a Google AppEngine Python application connected with my domain. I want to be able to send emails from any email, like: [email protected] So I use sendmail() and set mailobject.sender = "[email protected]", but it does not work. Also I made a receive function, but I don't want to receive...

GAE DOMDocument::load(): I/O warning : failed to load external entity

I'm trying to move an existing webapp on GAE. At the moment the app is running on my local SDK. When the app perform a compatibility check, it returns an error (read by FIREBUG ): This is the code of the js who fails: function checkConfig(){ // Launch the configuration...

Dart - Polymer Unit Testing. Not able to reference dom elements after click event

Not able to reference dom elements. Most of the test case works except for the last expectation in ClickSignInButton when I want to make sure I can evaluate error message div when form is submitted without any data. expect(document.querySelector('qme-header').shadowRoot .querySelector('#headerErrorDiv'), isNotNull); always fails and headerErrorDiv is null even though its...

GAE/P: Migrating to NDB efficiently

I'm finally upgrading from db to ndb (it is a much bigger headache than I anticipated...). I used a lot of ReferenceProperty and I've converted these to KeyProperty. Now, every place where I used a ReferenceProperty I need to add an explicit get because it was previously done for me...

Google App Engine datastore: filter()

I'm trying to retrieve an entry from Google App Engine's datastore using the filter() method as follows: result = Sender.all().filter("email =", email).filter("source_address =", source).filter("dest_address =", dest).filter("food_type =", food_type) Then, if such an entry exists, I change the value of one of the columns in that entry. Otherwise, I'm displaying an...

core-animated-pages in Polymer 1.0

I noticed that there is no substitute for core-animated-pages in Polymer 1.0 (there is no iron-animated-pages). Am I missing something? Is there any other way to implement similar functionality? Any answer greatly appreciated.

Polymer 1.0 how to call a paper-icon-button's tap when a coupled paper-input-container receives the enter key

I have a paper-input-container next to a paper-icon-button and want to trigger the same function that is wired to the paper-icon-button's on-tap handler when a user hit's enter while the input has focus... anyone know how to do this. <html> <head> </head> <body> <dom-module id="example-stuff" > <style> :host { display:...

jquery google app engine

I have an issue where the Javascript file that I have uploaded does not work. My code is below. app.yaml has: - url: /js static_dir: /js index.html has: <script type="text/javascript" src="/js/script.js"></script> script.js has: $(document).ready(function(){ $('img').click(function(){ $(this).fadeOut('slow'); }); $('p').click(function(){ $(this).fadeOut('slow'); }); alert("hi"); }); and not even the alert comes out...

polymer 1.0 data binding not working as expected

I'm trying to bind some data in a custom element but to no avail. I have a system-menu.html that has my custom element: system-menu.html <link rel="import" href="../../bower_components/polymer/polymer.html"> <link rel="import" href="../../bower_components/iron-menu-behavior/iron-menubar-behavior.html"> <dom-module id="system-menu"> <template> <template is="dom-repeat" items="{{data}}"> <li>{{}}</li> </template> </template> </dom-module> <script> (function() {...

Dart Polymer: Creating PaperDialog with CoreAnimatedPages displayed incorrectly in Firefox

I use Dart Polymer PaperDialogs containing CoreAnimatedPages. The idea is to have popups in which you can click through multiple option views. Example repository available at: DialogView: view.html <link rel="import" href="packages/polymer/polymer.html"> <link rel="import" href="packages/paper_elements/paper_button.html"> <link rel="import" href="packages/paper_elements/paper_dialog.html"> <link rel="import"...

GAE Managed VMs: Possible to use C-based Python libraries with standard runtime?

I'm building a background module for my app in Python 2.7, but it needs to use C-based external libraries such as OpenCV. While GAE only "directly" supports pure Python libraries, I understand that using a managed VM removes that constraint. What I'm not quite clear on, after reading the documentation,...

Scaling non-default version of Google App Engine Backend

I have a live app that uses Google App Engine (python) for the backend. The app is pointing Because the API has changed significantly, I've set up a new version of the backend, 'v2', and am pointing the new app to I see now in the docs, that...

How to notify page transition with iron-pages

I am playing around with the Polymer Starter Kit by building a simple application which has a few pages. I would like for one of the pages to display a list of items that it loads from the server. The issue is that this list must load only when the...

Change style programmatically

I'm attempting to follow the Custom property API for Polymer elements docs with regards to updating an element's CSS properties (and styles) programmatically but can't seem to get it working. Here is my current attempt: <link rel="import" href=""> <dom-module id="my-namecard"> <style> :host { --color: green; } span { color: var(--color,...

IllegalArgumentException: expected primitive class, but got: class UUID

My app is using GAE endpoints. My model has UUID. And once i try to send it Android app it encounters illegalArgument exception. Anyone has got recommendations how to handle endpoints model with UUID on android app with Google App Engine endpoints? 06-14 23:26:49.560 27462-27488/com.example E/AndroidRuntime﹕ FATAL EXCEPTION: AsyncTask #1...

Polymer dom-repeat and displaying result of iron-ajax call

I have a feed of GP Practice addresses the start of which is as follows (not the whole feed which is over 16000 entries - still got to figure out paging) [{"Address1":"73 UPPER WICKHAM LANE","Address2":"WELLING","Address3":"KENT","Address4":"","Address5":"","CloseDate":"\/Date(-62135596800000+0000)\/","ContactName":"","ContactTelephone":"020 88541910","EmailAddress":"","LastUpdatedDate":"\/Date(1434749040000+0100)\/","Name":"(GPSI) DR AC...

Having trouble applying a mixin in Polymer

I'm having problems getting a mixin to work in polymer. I've created --test-theme but it's not applying the style inside the element. Any ideas where I'm going wrong? story-card.html <dom-module id="story-card"> <style> :host { display: block; box-sizing: border-box; } #story-card { min-height: 5em; max-width: 45%; margin-left: auto; margin-right: auto; padding:...

Google Appengine - Entity class is not enhanced

If I change an Entity class in a an appengine project in eclipse, in run time I get this error Found Meta-Data for [classpath] but this class is not enhanced!! Please enhance the class before running DataNucleus. Even when I undo the changes and re-run the local srv i get...

Objectify - should I create an entity super class?

Is there any reason why shouldn't all my entities be subclasses of one generic ModelEntity object? @Entity public class ModelEntity { @Id Long id; } @Subclass public class User extends ModelEntity { @Index String username; } The advantages are clear: there is code common to all entities (like id, date,...

How to style Polymer's toolbar background in 0.5?

I'm having issues trying to set the full background color of the toolbar in Polymer 0.5 when using core-scaffold. What I've tried so far on Stackoverflow only sets the left menu side, but not the right content side. How does one set the background color for the full toolbar? Below...

Click event not firing in polymer paper-icon-button

I have the following page defined <!DOCTYPE html> <html> <head> <title>Practice List</title> <link rel="import" href="elements/elements.html" /> <link rel="stylesheet" type="text/css" href="Styles/styles.css" /> <!-- google fonts definitions --> <link href=',700' rel='stylesheet' type='text/css'> <script src="bower_components/webcomponentsjs/webcomponents-lite.js"></script> </head> <body unresolved...

Inheritance of customized polymer element in version 1.0

I have two polymer elements which have similar characteristics. I'm trying to "merge" those two to one element. What I see in the documentation is that custom elements can not be inherited in polymer 1.0. It starts here: <div title="{{tile.description}}" class="flex-item"> <template is='dom-if' if='{{typeIsSingle}}'> <single-item-tile tile='{{tile}}'></single-item-tile> </template> <template is='dom-if' if='{{typeIsGrouped}}'>...

Icon list for Polymer

The polymer starter kit makes references to <iron-icon> to implement icons. For example: <iron-icon icon="home"></iron-icon> I've checked the iron-icons section on the Polymer Catalog website, but the demo which should show all the icons is which is missing. Is there any other reference of all the icons in the <iron-icon>...

Dropshadow from paper-toolbar overlays paper-dialog

I have basic drawer app with a dialog box. When the dialog box opens the dropshadow from the toolbar(I assume) is bleeding over the box. Is there a fix for this? <paper-drawer-panel> <paper-header-panel drawer> </... <paper-header-panel main> <paper-toolbar> <paper-dialog>...</paper-dialog> </paper-toolbar> </paper-header-panel> </paper-drawer-panel> Some things I have tried includes moving the...

Getting user credentials using Google+ API

I am trying to include Google sign in in my android application using Google+ Api. I am able to take account details from the user but once signed in I am getting null when requesting for username using call: Plus.PeopleApi.getCurrentPerson(mGoogleApiClient).getDisplayName() And Logcat shows: BasicNetwork.performRequest: Unexpected response code 403 for

Set focus for paper-input via radio button

In Polymer (1.0), how can I set the focus of the iron-input when (as example) radiobutton 'radio1' is selected. <div> <div>Title:</div> <paper-radio-group> <paper-radio-button name="radio1">Radio1Label</paper-radio-button> <paper-radio-button name="radio2">Radio2Label</paper-radio-button> </paper-radio-group> <paper-input-container> <input is="iron-input"> </paper-input-container> </div> ...

GAE Python PyML ImportError: No module named _ckernel

I'm trying to import PyML on Google App Engine as a requirement for another library, however I am getting the following import error: File "/base/data/home/apps/s~myapp/uno.385079313378714244/PyML/", line 4, in <module> from PyML.containers import * File "/base/data/home/apps/s~myapp/uno.385079313378714244/PyML/containers/", line 3, in <module> VectorDataSet = __import__('PyML.containers.vectorDatasets', fromlist=['']).VectorDataSet File...

How do I use dom-repeat in Polymer binding to a dictionary

I am trying to bind to data below which is a dictionary <template is="dom-repeat" items="{{data}}"> </template> I have found a similar question here Polymer: How to loop and render HTML to screen <template repeat="{{customer, i in customers}}"> <div>{{i}}, {{}}</div> </template> but I am not sure if this applies to Polymer...

google-signin don't return user info

I am using google-signin element from Google Web Components, but I don't know how to return user info. <google-signin client-id="{{my-id}}" scopes="email profile" signed-in="{{signedIn}}"></google-signin> I tried to write some JS function but it didn't work. function (signedIn) { var profile = gapi.auth2.getAuthInstance().currentUser.get().getBasicProfile(); console.log('Name: ' + profile.getName()); console.log('Image: ' + profile.getImageUrl()); }...

Using Polymer iron-ajax in repeating template

How do I load a json file and use the data in a repeating template? This code doesn't produce anything: <dom-module id="name-list"> <template> <iron-ajax auto url="names.json" handleAs="json" lastResponse="{{data}}"></iron-ajax> <template is="dom-repeat" items="{{data}}"> <div>First name: <span>{{item.firstName}}</span></div> <div>Last name: <span>{{item.lastName}}</span></div> </template> </template> </dom-module> <script> Polymer({...

No module named _mysql - Google App Engine & Django

First of all I'm working on Mac (Yosemite). I've created a simple Django project with Google App Engine. I'm using Cloud SQL in production and MySQL in development environment as recommended in the docs. The project uses virtualenv on my dev machine of course. I can run the project with...

Polymer 1.0 app-theme only affecting index.html and not on custom elements

I'm using the Polymer Starter Kit, and I wanted to move the scaffold into it's own element <main-scaffold>. There are styles in app-theme.html that applied to it before I moved it into from index.html into it's own element, but now none of the styles apply. This is the case for...

Polymer Data-Binding will not replace

I have a polymer element that refuses to bind, and I can't figure out why. The rendered output is just sending the raw {{varName}} rather than replacing it with the appropriate value. However, formulas (with the [[fn(arg)]] syntax) and binding to tags (with the $="{{varName}} syntax) works fine. Any idea...

Do we HAVE to generate and use client libraries to use Google App Engine's Endpoints?

I am currently developing an Swift iOS app with GAE Endpoints for the RESTful API. It seems like all the tutorials and documents make you generate and use client libraries if you need to use the API on the client side. I was wondering if it's possible for me to...

dom-if doesn't get updated in dom-repeat

<template is="dom-repeat" items="{{fruit_list}}" as="fruit"> <template is="dom-if" if="{{fruit.isOrange}}"> I'm an orange! </template> </template> Here I have a dom-if template inside a dom-repeat template. It works great if the value of fruit.isOrange has already been finalized. However if not, for example, it was true when before but now I change it to...

serving GAE applications over http

I have implemented an application on GAE which can be accessible through https://<my_app_id> Now I have a custom domain registered with As described in GAE documentation I have mapped my custom domain to https://<my_app_id> and I see my application getting served from my custom domain. But I see requests...

Computed binding doesn't work with on-click (Polymer)

<template is="dom-repeat" items="{{myItems}}"> <div on-click="{{ComputedBindingFunction(item)}}">Foo</div> </template> This yields an error saying: listener method {{ComputedBindingFunction(item)}} not defined Shouldn't the function be executed, instead of literally trying to attach the function name with {{}}'s to on-click according to the docs? Note that ComputedBindingFunction returns a function....

What is the equivalent of BlobstoreLineInputReader for targeting Google Cloud Storage?

This is a python appengine question, mapreduce library 1.9.21 . I have code writing lines to a blob in the local blobstore, then processing that using mapreduce BlobstoreLineInputReader. Given that the files api is going away, I thought I'd retarget all my processing to cloud storage. I would expect to...

Polymer 1.0 in Ember-cli, wrong appearance

I have managed to integrate Polymer 1.0 to my Ember-cli project. This my Brocfile var vulcanize = require('broccoli-vulcanize'); var pickFiles = require('broccoli-static-compiler'); var mergeTrees = require('broccoli-merge-trees'); var EmberApp = require('ember-cli/lib/broccoli/ember-app'); var app = new EmberApp({ compassOptions: { sassDir: "app/styles/main", outputStyle: 'expanded' } }); //app.import("./bower_components/webcomponentsjs/webcomponents-lite.min.js"); var polymerVulcanize = vulcanize('app', { input:...

Change google-map center using Polymer

I'm working on a custom element using Polymer. I want to change its center after it was rendered. I can't found it on Polymer docs. Anyone could help me? <dom-module id="my-map"> <template> <google-map latitude="{{latitude}}" longitude="{{longitude}}" zoom="15"> </google-map> </template> <script> Polymer({ is: "my-map" // I want to change map center here...

Why does the polymer property binding need a tag in my template?

I am trying to understand how Polymer renders properties in the template of a custom element. I'm seeing some behavior that I can't explain, where some properties are being rendered in one case (when surrounded by tags), but not in another (when tags are not present in the template). To...