meteoric / meteor-ionic

Ionic components for Meteor. No Angular!
http://meteoric.github.io
MIT License
1.51k stars 219 forks source link

I'm having problems when I try to open a modal on Android #296

Open jerocosio opened 9 years ago

jerocosio commented 9 years ago

Hi, I am having trouble on my app when I try to run it on Android, the modals just won't open and I get this error every time:

I20150827-19:49:55.492(-5) (android:http://meteor.local/packages/meteor.js:914) Exception in setTimeout callback: Error: Can't render undefined
I20150827-19:49:55.492(-5)? at checkRenderContent (http://meteor.local/packages/blaze.js?a5c324925e5f6e800a4c618d71caf2848b53bf51:2211:11)
I20150827-19:49:55.492(-5)? at contentAsFunc (http://meteor.local/packages/blaze.js?a5c324925e5f6e800a4c618d71caf2848b53bf51:2254:3)
I20150827-19:49:55.493(-5)? at Object.Blaze.renderWithData (http://meteor.local/packages/blaze.js?a5c324925e5f6e800a4c618d71caf2848b53bf51:2327:49)
I20150827-19:49:55.493(-5)? at Object.<anonymous> (http://meteor.local/packages/meteoric_ionic.js?03da468d942b2803f17019f6bd899e39fbe86644:4195:24)
I20150827-19:49:55.493(-5)? at _.extend.withValue (http://meteor.local/packages/meteor.js?4dc9757b244a30bdf37a732ac4db4026ce56fb6b:981:17)
I20150827-19:49:55.493(-5)? at http://meteor.local/packages/dispatch_kernel.js?af06bfaf7aaa69628056cc7dbd3fa3dac7aed7b3:466:45
I20150827-19:49:55.493(-5)? at http://meteor.local/packages/meteor.js?4dc9757b244a30bdf37a732ac4db4026ce56fb6b:1009:22
I20150827-19:49:55.493(-5)? at Object.f (http://meteor.local/packages/dispatch_kernel.js?af06bfaf7aaa69628056cc7dbd3fa3dac7aed7b3:133:7)
I20150827-19:49:55.494(-5)? at renderLoop (http://meteor.local/packages/dispatch_kernel.js?af06bfaf7aaa69628056cc7dbd3fa3dac7aed7b3:395:21)

The way I'm opening the modals is :

{{#each productos}}
  {{#ionItem class="avatar lista-productos"}}
    <a class="item item-avatar" data-ion-modal="_producto" data-id="{{_id}}">
      <img  src="{{imagen}}">
      <h2>{{nombre}}</h2>
      <p>{{formatoDinero precio}} - {{tamano}}</p>
    </a>
  {{/ionItem}}
{{/each}}

And my modal is:

<template name="_producto">
{{#ionModal customTemplate=true}}
      <div class="bar bar-header bar-stable">
        <h2 class="title">{{#with producto}}{{nombre}}{{/with}}</h2>
        <button data-dismiss="modal" class="button button-icon"><i class="icon ion-ios-close-empty"></i></button>
      </div>
      <div class="content has-header has-footer overflow-scroll">
          {{#with producto}}
            <img src="{{imagen}}" class="imagenDetalleProducto">
          {{tituloNav}}
          <div class="row infoProductoRow">
            <div class="col col-67">{{nombre}}</div>
            <div class="col col-center infoProductoPrecio">{{formatoDinero precio}}</div>
          </div>
          <div class="row infoProductoContador">
            <div class="col col-33 contadorMenos">-</div>
            <div class="col ">{{ contadorProducto }}</div>
            <div class="col contadorMas">+</div>
          </div>
          <div class="row infoProductoTamano">
            <div class="col col-50 textoTamano">Tamaño: </div>
            <div class="col tamanoProducto">{{tamano}}</div>
          </div>
          <div class="descripcionDetalleProducto">{{descripcion}}</div>
            {{/with}}
          </div>
        {{#ionFooterBar class="bar-balanced botonAgregarProducto"}}
      {{#with producto}}
      <h1 class="title" id="botonProducto" data-id="{{_id}}">AGREGAR {{ contadorProducto }} AL CARRITO</h1>
      {{/with}}
   {{/ionFooterBar}}
  {{/ionModal}}
</template>

The strange thing is that they work perfectly on iOS (device and simulator) and also on Chrome with no problem, do anyone has any idea what could be causing this problem?

Also I'm getting this error almost everytime I change router in Android, I don't know if it's related:

I20150827-19:52:16.259(-5) (android:http://meteor.local/packages/meteor.js:914) Exception from Tracker afterFlush function:
I20150827-19:52:16.273(-5) (android:http://meteor.local/packages/meteor.js:914) Error: Can't call View#autorun from a Tracker Computation; try calling it from the created or rendered callback

Thank you all in advance!