AceCentre / pasco

Phrase Auditory Scanning COmmunicator - AAC App for iOS and the Web
https://app.pasco.chat
GNU General Public License v3.0
15 stars 6 forks source link

upgrade to 1.0 pasco-data-state & dropbox-sync &.... #248

Closed hosseinzoda closed 3 years ago

hosseinzoda commented 3 years ago

...recreate cordova project + random fixes

The PascoDataState upgrade is about converting all links in all files as relative links to the place it has been declared. This upgrade allows copy of all stored data to other platforms with no need to modify any content at the time of import or export. Moreover it introduces the pasco-state.json file which holds the list of all stored files in pasco with their checksum and file size.

The sync tab has been added in edit-config page. Everything related to saving and loading data from dropbox is in there. It should be easy to use.

I tried to run cordova on macos Big Sur with no success. So I did end up re-creating cordova configuration. With that still few files has been modified in the cordova directory. The same install process can be used with a new clone of pasco. But I think the cordova-icon generator should get called before publishing the app.

A custom protocol has been added to cordova ios (pasco://), It enables the authorization of dropbox.

Two required environment variables has been introduced in this commit. They are required when running build scripts.

  1. PASCO_BACKEND_URL (default value is 'https://backend.pasco.chat')
  2. DROPBOX_APP_KEY (Should be the client_id of the dropbox app)

related to #243

hosseinzoda commented 3 years ago

I have added the implementation of #238 and #244 to this pull request.

willwade commented 3 years ago

I'm getting some load errors. E.g load up "Adult Starter" and I get..

NotFoundError: File not found: ../Spell_Prediction/bncfrequency.json construct@[native code] _construct@http://localhost:3000/js/nodelib.js:153:26 Wrapper@http://localhost:3000/js/nodelib.js:484:23 construct@[native code] _createSuperInternal@http://localhost:3000/js/nodelib.js:4659:414 NotFoundError@http://localhost:3000/js/nodelib.js:4675:24 http://localhost:3000/js/core.js:1174:55

I can see the files are there..

willwade commented 3 years ago

I think we are seeing a crash/freezing..

https://www.dropbox.com/s/uk3qc2cu0083w7t/Screen%20Recording%202021-03-02%20at%2009.27.20.mov?dl=0

It happens twice.. 2:48 and again at 4:18. I cant see any output or crash occurring. Just all keyboard events don't work and speaking stops. Maybe just a safari problem..

willwade commented 3 years ago

Check out the preview build here: https://603e086b8a99249047957bad--pasco-app.netlify.app/

Note when I go to https://603e086b8a99249047957bad--pasco-app.netlify.app/help.html (Safari) - its displaying a blank page.

willwade commented 3 years ago

Here's a wierd one. Occasionally it seems to start scanning fast - as though "First time run Voice" is set to be on.

https://www.dropbox.com/s/axq53w3lmu71q3e/Screen%20Recording%202021-03-02%20at%2009.53.08.mov?dl=0

hosseinzoda commented 3 years ago

I think we are seeing a crash/freezing..

https://www.dropbox.com/s/uk3qc2cu0083w7t/Screen%20Recording%202021-03-02%20at%2009.27.20.mov?dl=0

It happens twice.. 2:48 and again at 4:18. I cant see any output or crash occurring. Just all keyboard events don't work and speaking stops. Maybe just a safari problem..

In which browser you are experiencing this error?

hosseinzoda commented 3 years ago

I think we are seeing a crash/freezing..

https://www.dropbox.com/s/uk3qc2cu0083w7t/Screen%20Recording%202021-03-02%20at%2009.27.20.mov?dl=0

It happens twice.. 2:48 and again at 4:18. I cant see any output or crash occurring. Just all keyboard events don't work and speaking stops. Maybe just a safari problem..

I think this issue is related to speech synthesizer. I'll check it out.

willwade commented 3 years ago

Ok. It's safari on Mac.

willwade commented 3 years ago

Did this run on your xcode simulator OK? Mine is getting a white screen on load.. Screenshot 2021-03-02 at 17 09 47

hosseinzoda commented 3 years ago

Yes. I did test it on the simulator. Please open safari on the Develop menu you can find remote inspector. You can see the errors there. Click on the refresh button to see the errors if not there already.

willwade commented 3 years ago

Where's remote inspector?! Screenshot 2021-03-02 at 17 19 09

hosseinzoda commented 3 years ago

It should be below "Will's MacBook Pro". It's not there. Maybe the simulator is not running. Or the app is not running.

hosseinzoda commented 3 years ago

This commit (069e31d) should solve the mentioned issues until now.

willwade commented 3 years ago

Hmm. Ok - still getting white screen on simulator (but have found the remote debugger..)

Seeing this.. When I reload the console in the debugger. (latest PR changes applied)

Screenshot 2021-03-02 at 19 18 39
hosseinzoda commented 3 years ago

Well, That says inappbrowser plugin is not installed. So probably with these commands this will get fixed.

cd path/to/pasco/cordova
cordova platform rm ios
rm -rf node_modules
cordova platform add ios
hosseinzoda commented 3 years ago

You need also upgrade to cordova 6. I think this command will do it.

sudo npm remove -g cordova
npm install -g --user cordova