Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not working in device or emulator android #54

Closed
ITACC2018 opened this issue May 31, 2018 · 25 comments
Closed

Not working in device or emulator android #54

ITACC2018 opened this issue May 31, 2018 · 25 comments

Comments

@ITACC2018
Copy link

ITACC2018 commented May 31, 2018

hy,,,,it run when i open throught the browser but not working when i run through emulator or device android?

@eakoriakin
Copy link
Owner

eakoriakin commented May 31, 2018

Hi, what error do you get?
Can you share a small repo with your issue so I could help you?

@ITACC2018
Copy link
Author

when i click error

ERROR Error: Uncaught (in promise): Error: No component factory found for t. Did you add it to @NgModule.entryComponents?
Error: No component factory found for t. Did you add it to @NgModule.entryComponents?

@eakoriakin
Copy link
Owner

@ITACC2018
Copy link
Author

ITACC2018 commented Jun 8, 2018

still not working..i got error when i build apk and i installed in deviced
Error: No component factory found for t. Did you add it to @NgModule.entryComponents?

but if i run with
ionic run android -l -c OR ionic emulate android -l -c
it's working.
not working when i build .APK

app.module.ts
import { NgModule, ErrorHandler } from '@angular/core';
import { BrowserModule } from '@angular/platform-browser';
import { HttpModule } from '@angular/http';
import { Network } from '@ionic-native/network';
import { HttpClientModule } from "@angular/common/http";
import { StatusBar } from '@ionic-native/status-bar';
import { SplashScreen } from '@ionic-native/splash-screen'
import { IonicApp, IonicModule, IonicErrorHandler } from 'ionic-angular';
import { MyApp } from './app.component';
import { IonicImageViewerModule } from 'ionic-img-viewer';
import { IonicImageLoader } from 'ionic-image-loader';
//import { FCM } from '@ionic-native/fcm';

import { SelectSearchableModule } from 'ionic-select-searchable';

@NgModule({
declarations: [
MyApp
],
imports: [
BrowserModule,
HttpModule,
HttpClientModule,
LinkyModule,
MomentModule,
ComponentsModule,
IonicModule.forRoot(MyApp, {
iconMode: 'ios',
modalEnter: 'modal-slide-in',
modalLeave: 'modal-slide-out',
tabsPlacement: 'bottom',
pageTransition: 'ios-transition'
}),
AngularFireModule.initializeApp(firebaseConfig),
AngularFireDatabaseModule,
AngularFireAuthModule,
ChatModule,
AboutPageModule,
SelectSearchableModule,
IonicImageViewerModule,
IonicImageLoader.forRoot()
],
bootstrap: [IonicApp],
entryComponents: [
MyApp
],
providers: [
StatusBar,
SplashScreen,
AuthServiceProvider,
{provide: ErrorHandler, useClass: IonicErrorHandler},
AuthServiceProvider,
EmojiProvider,
BotmanProvider,
CoaKategoriProvider,
ToastService,
Network,
HelpCategoryProvider,
BlogsBlogsProvider,
GhostProvider
//FCM
]
})
export class AppModule {}

and i imported in

import { NgModule } from '@angular/core';
import { IonicPageModule } from 'ionic-angular';
import { AboutPage} from './about';
import { SelectSearchableModule } from 'ionic-select-searchable';

@NgModule({
declarations: [AboutPage],
imports: [
IonicPageModule.forChild(AboutPage),
SelectSearchableModule
],
})
export class AboutPageModule { }

https://github.com/ITACC2018/itcaremobile/blob/master/src/app/app.module.ts

what this works on in android@7.0.0 ?

@eakoriakin
Copy link
Owner

Can you share a project/repo with this error?

@ITACC2018
Copy link
Author

ITACC2018 commented Jun 8, 2018

sure,, this my repo
https://github.com/ITACC2018/itcaremobile

Error: No component factory found for t. Did you add it to @NgModule.entryComponents?
this error only appears only when i deploy to apk.

@eakoriakin
Copy link
Owner

Good, I'll have a look

@eakoriakin
Copy link
Owner

Install the latest version 2.4.0.
Also, there were some breaking changes in versions above 1.0.0. Follow the below instructions to update:

@ITACC2018
Copy link
Author

ITACC2018 commented Jun 9, 2018

woow it's working..thanks you so much..you save my life
👍 👍 🍺 🍺

@eakoriakin
Copy link
Owner

@ITACC2018 don't forget to star the project 🙂 and let your friends know about it 👍

@prescindivel
Copy link

I have a similar problem in the version 2.10.0.

ERROR Error: Uncaught (in promise): Error: No component factory found for SelectSearchablePageComponent. Did you add it to @NgModule.entryComponents?
Error: No component factory found for SelectSearchablePageComponent. Did you add it to @NgModule.entryComponents?

I'm using lazyload on pages like:

image

image

@eakoriakin
Copy link
Owner

Hey, there’s no need to import SelectSearchablePageComponent to entryComponents. Importing SelectSearchableModule is enough

@prescindivel
Copy link

prescindivel commented Aug 28, 2018

I just imported SelectSearchableModule see:

image

when I click on select the following error occurs:

ERROR Error: Uncaught (in promise): Error: No component factory found for SelectSearchablePageComponent. Did you add it to @NgModule.entryComponents?

Thank you for your help!

@lilianfelismino
Copy link

Hi there! I work with @prescindivel and we are trying to use this component on a lazyload page. Have you ever tryied to use it like we are trying to? Does it work that way?
Thanks in advance.

@CoreyReynolds
Copy link

I have a LL project lilanfelismino, worked for me same as any other.

@lilianfelismino
Copy link

Hey there, @CoreyReynolds! What version are you using? We are trying with version 2.10.0 of the ionic-selectable component + ionic 3 and it's not working.. :( Is there a possibility of sharing your LL project, or maybe by seeing our code above, to give us some ideas of what would we do to make it work?

@CoreyReynolds
Copy link

Unfortunately it's not solely my project and I'm unable to host it for you to view, but if you're getting a specific error please share it.

@lilianfelismino
Copy link

As you can see above, as @prescindivel already shared it, we are getting this error:

ERROR Error: Uncaught (in promise): Error: No component factory found for SelectSearchablePageComponent. Did you add it to @NgModule.entryComponents?

Any ideas?
Thank you.

@CoreyReynolds
Copy link

CoreyReynolds commented Aug 29, 2018

Missed the connection between you two.
I'm looking at my project and I haven't done anything different:
`
import { NgModule } from '@angular/core';
import { IonicPageModule } from 'ionic-angular';
import { SignaturePage } from './signature';
import { SelectSearchableModule } from 'ionic-select-searchable';
import { SignaturePadModule } from 'angular2-signaturepad';

@NgModule({
declarations: [
SignaturePage,
],
imports: [
IonicPageModule.forChild(SignaturePage),
SelectSearchableModule,
SignaturePadModule
],
})
export class SignaturePageModule {}

`

Sometimes ionic errors can be a bit indirect. Is it possibly referencing a different page/module?
Also, just to see if it works, add import { SelectSearchableModule } from 'ionic-select-searchable'; to your imports and SelectSearchableModule to your imports and providers section.

@lilianfelismino
Copy link

Alright, @CoreyReynolds! We are gonna try to do it with a different page. I'll let you know.

Thank you very much!

@prescindivel
Copy link

Hi guys, I did both tests to confirm if the problem really is with the lazy load.

I had the same error with the lazy load:

Error: No component factory found for SelectSearchablePageComponent. Did you add it to @NgModule.entryComponents?

I created a repository with two projects, one normal and another lazyload: https://github.com/prescindivel/ionic-selectable-test

@CoreyReynolds which version of the ionic-selectable do you use?

@CoreyReynolds
Copy link

CoreyReynolds commented Aug 30, 2018 via email

@lilianfelismino
Copy link

lilianfelismino commented Aug 31, 2018 via email

@eakoriakin
Copy link
Owner

Hey guys, I’m on vacation now. I’ll try to help you when I’m back in a week or two

@eakoriakin eakoriakin reopened this Aug 31, 2018
@eakoriakin
Copy link
Owner

This seems like a stale issue. New versions 3.3.0 and 4.3.0 have been release since then.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants