Closed vidhathriavadhanyms closed 4 years ago
Hi @vidhathriavadhanyms , the error you sent, it seems like you have not configured the adapter properly on Mobile Foundation.
Please follow the troubleshooting guide ( https://github.com/IBM/virtual-mirror-for-ecommerce/blob/master/TROUBLESHOOTING.md) , connect your phone to your laptop, turn on usb debugging on your phone, open the troubleshooter in chrome and you will know what is the problem
I will recommend you to take a look at the troubleshooting guide : https://github.com/IBM/virtual-mirror-for-ecommerce/blob/master/TROUBLESHOOTING.md
We have updated the documentation few days ago, you might have missed out some steps. Make sure you follow the documentation and perform all the steps from 1 to 4. We have tested and validated entire pattern. It works fine.
Thank you
@vidhathriavadhanyms please follow this guide https://github.com/IBM/virtual-mirror-for-ecommerce#troubleshooting. you will come to know where you have gone wrong with the help of debug messages.
Hi @RahulReddyRavipally @manojjahgirdar , I have followed the documentation correctly and checked the guide too. My adapter has got deployed but the application itself is not deployed. Is there something I am missing on during the deployment? In the mobile foundation dashboard, it shows only the adapter that is deployed, but not the application
@vidhathriavadhanyms you might have forgotten to register the app to Mobile Foundation. You can do so by these simple steps documented in step 4.5.3. Thanks.
@manojjahgirdar it's done, still getting the same error
@vidhathriavadhanyms Can you share your debug screen?
@vidhathriavadhanyms Also did Step 4.4.3 give you the results as mentioned in the examples?
@manojjahgirdar Thanks, I followed the troubleshooting guide and successfully deployed it on my phone. Now, the images of the accessories are not getting loaded and when I click on Tryon, it says "Hang On!!" and doesn't go further. I'm attaching the screenshot of the debug screen along with the console. Could you please check and let me know what the error could be.
Thanks
@manojjahgirdar any updates?
@vidhathriavadhanyms Looks like your mobile application has no issues. Go to https://cloud.ibm.com/resources Under Storage Click on Cloud Object Storage and verify if you can see the bucket which you created there has been added with the jewelry images. If you cannot see jewelry images there, follow step 2.2.1 Thanks.
@vidhathriavadhanyms Also make sure you have done step 4.4.2 right, because by configuring adapter with apikey, bucket name, etc you are establishing a secure connection between your mobile app and the Cloud Object Storage where you have stored the Images. Thanks
@manojjahgirdar It's done, adapter and the application are correctly deployed. Here I share my Mobile Foundation service dashboard and the debug screen
@manojjahgirdar I found that in all the image links, the localhost is getting added due to which we may be getting this 404 error. If I copy the same link and remove the localhost from it, I can see the images.
The following are the warnings I'm getting as soon as I open the application
This is the error I'm getting
If I copy the link in the above screenshot and remove the localhost from that, I can see the images
@vidhathriavadhanyms Interesting... I can see that you have configured the Adapter and Deployed the recommendation engine correctly. I don't see from where the http://localhost/
is getting appended from. I guess there is some issue with the JewelleryStoreApp
. I'll figure it out and notify you once I fix the application.
@manojjahgirdar Sure, Thank you :)
@manojjahgirdar I found that in JewelleryStoreApp/e2e/protractor.conf.js, there is a line, baseUrl: 'http://localhost:4200/' and in JewelleryStroreApp/MobileFoundationAdapter/ImagesFetch/pom.xml, there is a line,
Could those be causing a problem? These are just my findings. There might be many other files in which the URL could be specified.
@manojjahgirdar any updates?
@vidhathriavadhanyms
As you explored and found the two occurrences of http://localhost/
in the source code, the problem is not caused by them. the URL is supposed to be fetched by the application dynamically with the help of Mobile Foundation Adapter.
For your understanding Image URL is fetched something like this: src=" (baseURL)(imageName)". The baseURL is your Cloud Object Storage URL which I can see from the screenshots you sent its "s3.us.cloud-object-storage.appdomain.cloud/vmbkt/" and the imageName are the jewellery product names example hanging1.png. Hence the app will display Image with src = "s3.us.cloud-object-storage.appdomain.cloud/vmbkt/hanging1.png".
The problem here is there is no https://
at the beginning of your baseURL so the final src URL is not a openable URL.
What you can do is goto your Mobile Foundation Adapter Configuration page and just append https://
to the Cloud Object Storage Endpoint Public URL
. and just save the adapter as shown below.
After that is done no need to redeploy application or anything.. Open the Application in your Mobile it should show you the Images.
Hope this fixes the Issue.
@manojjahgirdar Thanks a lot, this fixed the issue of localhost. I am able to see the images. Now when I click on "Try on Virtual Mirror", it just says "Hang on" and throws an error on the console.
Here I share my debug screen.
@vidhathriavadhanyms, In this case, you might have not deployed the Virtual Mirror correctly. Goto the Virtual Mirror API URL
on your web browser it should display an O.K.
message which indicates the virtual mirror is deployed correctly. If you see "Hello World Starter App" then you have not deployed virtual mirror, follow step 3 to deploy the application correctly. Thanks.
@manojjahgirdar Thanks for the suggestion. I was getting the "Hello world starter app". Hence, I redeployed the Virtual Mirror. Now I am getting an O.K. message. I have updated the adapter configuration as well. I redeployed the application on my phone, but I am still getting the same error.
Virtual Mirror API
Debug Screen
Thanks
@vidhathriavadhanyms I have fixed the application, please clone the JewelleryStoreApp
directory and don't deploy the adapter again. Just register the application Step 4.5.3 and run the application Step 4.5.4
@manojjahgirdar Thanks for the response. As suggested, I cloned the JewelleryStroeApp directory and registered the app again. I built it and deployed it on my phone. I am still getting the same error. There is no change in the path resolution in the error message.
@vidhathriavadhanyms Are your Recommendation API URL
and Virtual Mirror API URL
in this format https://appname.xx-xx.appdomain.cloud/
? If so remove the /
from the end of the URL's example: https://appname.xx-xx.appdomain.cloud
from Mobile Foundation Adapter Configuration page and save the adapter. No need to redeploy the application just open the application on your phone it should fix the error. Thanks.
@manojjahgirdar Thanks a lot for your help. The virtual mirror started working, but I'm getting an error when I scroll horizontally, an error appears on the console which says, "[Intervention] Ignored attempt to cancel a touchmove event with cancelable=false, for example because scrolling is in progress and cannot be interrupted."
When I click on "Try on Virtual Mirror", another error which says, "GET https://virtualmirror.eu-gb.cf.appdomain.cloud/images/index.jpg 404 (Not Found)" appears and then it goes further to the virtual mirror.
@vidhathriavadhanyms The virtual mirror is not appearing ?
@manojjahgirdar virtual mirror is appearing after this. But at that point, 404 not found is thrown on the console
@vidhathriavadhanyms Since virtual mirror is working you can ignore the error...
I have deployed this application on my phone, but once I enter a name, age, and gender and submit, it says "MobileFirst Foundation unable to authorize COS" after this the recommendations are not getting loaded. Another alert message which says "Virtual Mirror not configured" also appears. What could have gone wrong?