-
Notifications
You must be signed in to change notification settings - Fork 27
Silent YAML parse failure prevents working copy of mobile-hub-project.yaml from being updated #16
Comments
I'm having the same issue.
executes uneventfully, but sync is not complete and trying to run:
return with error:
|
I also have the same issue. |
similar situation Just running:
gives the following error
the directory awsmobilejs/backend is empty
|
@pcolazurdo @sindreu can you let us know what your node --version and OS as well please? |
I have the same issue - nothing works, brand new project. awsmobile - v1.0.6, nodejs - v9.2.1, npm - v4.6.1. I get the same error and actually have nothing in /backend .... |
@typemismatch we are aware of an issue with v9.2.1. This seems to be directly related to fsevents specifically for v9. |
@mlabieniec sure, here it is: uname -aLinux ip-172-31-26-64 4.9.58-18.55.amzn1.x86_64 #1 SMP Thu Nov 2 04:38:47 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux node -vv8.9.1 npm -v5.6.0 |
Having same issue with same versions.... |
I couldnt reproduce that issue. I installed on linux and mac and it works fine. I guess it could be a credentials issue. Can you create a project using MobileHub console? |
It will be helpful to diagnose the issue if someone post the folder structure where are trying to execute awsmobile push. |
I reproduced this error... can not locate mobile-hub-project file inside awsmobilejs/backend ... I fix it by executing awsmobile pull and on sync question answer yes. |
This is the content of my structure: . |
I was able to create the project using the console with no issue at all (same credentials) but the pull / push process fails |
I'm also having the same issue. " can not locate mobile-hub-project file inside awsmobilejs/backend Any help will be much appreciated.. |
@pcolazurdo I tried the same environment and can't seem to reproduce. Can give a try:
just to eliminate the possibility of a corrupt npm environment. I'm wondering if perhaps it's a local install of the global module that may have failed....Also, what is your project type i.e. create-react-app or similar? |
Done that, still same issue ... when I install I can see an error that says: [execsync v1.0.2] Attempting to compile native extensions. but from what I can see there is no dependency from awsmobile into it (only the code coverage tests) - trying to fix the error with ExecSync seem to indicate that it won't work for node >0.10 |
I am having the same problem when running This is what I'm using:
If I copy the
So the |
Thanks. This issue is fixed by the latest update (1.0.7). |
Please follow these steps: npm update -g awsmobile-cli At this point the yaml file in the backend is restored. You should be able to continue your work as usual |
TL;DR
lib/aws-operations/mobile-yaml-schema.js
is missing a type definition, causing YAML a parse failure which is silently eaten when syncingmobilehub-project.yml
fromawsmobilejs/#current-backend-info
toawsmobilejs/backend
run
erases imported API configuration retrieved withpull
#12?Steps
awsmobile init <project id>
, leave all values as default when promptedComparing
mobile-hub-project.yml
inawsmobile/backend
andawsmobile/#current-backend-info/
gives:awsmobile pull
, and answer yes when prompted to sync changes from#current-backend-info
to the dev copyClearly those files are not synced...
So I poked around for the code prompting whether to sync (
lib/backend-operations/backend-info-manager.onSyncComplete
), and found that thebackendProject
object that's conditionally passed toexecuteSyncToDevBackend
is undefined.Tracing that undefined value upstream through
lib/backend-operations/ops-project.syncCurrentBackendInfo
led to a call tolib/aws-operations/mobile-yaml-ops.loadYml
, and in there I found a try/catch with several console.log statements hidden behind a "verbose" flag, which was eating all the errors.Setting
verbose
to true results in the following being printed to console:I found the YAML schema definition in
lib/aws-operations/mobile-yaml-schema.js
, where adding a jsyaml.Type definition forAppDO
stopped the parse failure and allowed the files to sync successfully:Since I don't know the broader implications of my workaround (or of the fact that definitions were missing in the first place, for that matter) I'm not comfortable working with the tool before an official fix, but I'm happy to submit a PR with this change plus some tests if it's that simple.
I'd also love to see a
--verbose
or--debug
flag or environment variable to prevent silent failures like this, and could put a PR together for that as well if helpfulThe text was updated successfully, but these errors were encountered: