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

Empty drawables, when running in batch mode and some error happens #5

Closed
Pitel opened this issue Nov 30, 2017 · 3 comments
Closed

Empty drawables, when running in batch mode and some error happens #5

Pitel opened this issue Nov 30, 2017 · 3 comments

Comments

@Pitel
Copy link

Pitel commented Nov 30, 2017

$ avdo -d drawable
Processing directory 'drawable':

TypeError: Cannot read property 'length' of undefined
    at strongRound (/usr/lib/node_modules/avdo/dist/plugins/bakeGroupTransforms.js:20:27)
    at /usr/lib/node_modules/avdo/dist/plugins/bakeGroupTransforms.js:68:48
    at Array.forEach (<anonymous>)
    at /usr/lib/node_modules/avdo/dist/plugins/bakeGroupTransforms.js:68:18
    at Array.forEach (<anonymous>)
    at fn (/usr/lib/node_modules/avdo/dist/plugins/bakeGroupTransforms.js:39:18)
    at /usr/lib/node_modules/avdo/dist/plugins/_plugins.js:30:32
    at Array.filter (<anonymous>)
    at recurseFn (/usr/lib/node_modules/avdo/dist/plugins/_plugins.js:23:37)
    at /usr/lib/node_modules/avdo/dist/plugins/_plugins.js:35:17
$ ll drawable
-rw-r--r-- 1 pitel pitel    0 lis 30 13:57 avatar_awake.xml
-rw-r--r-- 1 pitel pitel    0 lis 30 13:57 avatar_background.xml
-rw-r--r-- 1 pitel pitel    0 lis 30 13:57 avatar_sleep_inactive.xml
-rw-r--r-- 1 pitel pitel    0 lis 30 13:57 avatar_sleep_layer_list.xml
-rw-r--r-- 1 pitel pitel    0 lis 30 13:57 avatar_sleep.xml
-rw-r--r-- 1 pitel pitel    0 lis 30 13:57 baby.xml
-rw-r--r-- 1 pitel pitel    0 lis 30 13:57 circle_button_background.xml
-rw-r--r-- 1 pitel pitel    0 lis 30 13:57 circle_with_tranpsarent_border.xml
-rw-r--r-- 1 pitel pitel    0 lis 30 13:57 circular_button_cloudy_background.xml
-rw-r--r-- 1 pitel pitel    0 lis 30 13:57 circular_button_white_background.xml
-rw-r--r-- 1 pitel pitel    0 lis 30 13:57 cloud1.xml
-rw-r--r-- 1 pitel pitel    0 lis 30 13:57 cloud2.xml
-rw-r--r-- 1 pitel pitel    0 lis 30 13:57 cloud3.xml
-rw-r--r-- 1 pitel pitel    0 lis 30 13:57 cloud4.xml
-rw-r--r-- 1 pitel pitel    0 lis 30 13:57 cloud5.xml
-rw-r--r-- 1 pitel pitel    0 lis 30 13:57 connection_dot.xml
-rw-r--r-- 1 pitel pitel    0 lis 30 13:57 elipse.xml
-rw-r--r-- 1 pitel pitel    0 lis 30 13:57 feedback.xml
-rw-r--r-- 1 pitel pitel    0 lis 30 13:57 general_error.xml
-rw-r--r-- 1 pitel pitel 1,8K lis 30 13:43 ic_battery_empty.xml
-rw-r--r-- 1 pitel pitel    0 lis 30 13:57 ic_battery.xml
-rw-r--r-- 1 pitel pitel    0 lis 30 13:57 ic_battery_25.xml
-rw-r--r-- 1 pitel pitel    0 lis 30 13:57 ic_battery_50.xml
-rw-r--r-- 1 pitel pitel    0 lis 30 13:57 ic_battery_75.xml
-rw-r--r-- 1 pitel pitel 1,5K lis 30 13:38 ic_connection_edge.xml
-rw-r--r-- 1 pitel pitel  709 lis 30 13:38 ic_connection_lte.xml
-rw-r--r-- 1 pitel pitel 1,2K lis 30 13:38 ic_connection_wifi.xml
-rw-r--r-- 1 pitel pitel 1,7K lis 29 08:53 ic_connection_3g.xml
-rw-r--r-- 1 pitel pitel 2,8K lis 30 13:38 ic_dialog_comm_error.xml

The ic_battery_empty.xml is causing the issue

$ avdo drawable/ic_battery_empty.xml
TypeError: Cannot read property 'length' of undefined
    at strongRound (/usr/lib/node_modules/avdo/dist/plugins/bakeGroupTransforms.js:20:27)
    at /usr/lib/node_modules/avdo/dist/plugins/bakeGroupTransforms.js:68:48
    at Array.forEach (<anonymous>)
    at /usr/lib/node_modules/avdo/dist/plugins/bakeGroupTransforms.js:68:18
    at Array.forEach (<anonymous>)
    at fn (/usr/lib/node_modules/avdo/dist/plugins/bakeGroupTransforms.js:39:18)
    at /usr/lib/node_modules/avdo/dist/plugins/_plugins.js:30:32
    at Array.filter (<anonymous>)
    at recurseFn (/usr/lib/node_modules/avdo/dist/plugins/_plugins.js:23:37)
    at /usr/lib/node_modules/avdo/dist/plugins/_plugins.js:35:17
<?xml version="1.0" encoding="utf-8"?>
<vector xmlns:android="http://schemas.android.com/apk/res/android"
    android:width="23dp"
    android:height="10dp"
    android:viewportWidth="23"
    android:viewportHeight="10">

    <path
        android:fillType="evenOdd"
        android:strokeColor="#EE3C6E"
        android:strokeWidth="1"
        android:strokeLineCap="round"
        android:pathData="M20.72 6.797h0.373a1.44 1.44 0 0 0 1.436-1.436v-0.747a1.44 1.44 0 0
0-1.436-1.435h-0.374" />
    <path
        android:fillColor="#EE3C6E"
        android:fillType="evenOdd"
        android:pathData="M2.405 9.973c-1.313 0-2.38-1.02-2.38-2.277L0 2.278C0 1.021 1.07 0 2.382 0l5.116
0.008 a0.5 0.5 0 0 1 0 1h0.295L2.383 1C1.62 1 1 1.572 1 2.276l0.024 5.418c0 0.706 0.62
1.28 1.382 1.28L7.5 9a0.5 0.5 0 0 1 0 1l-5.094-0.027z" />
    <group
            android:translateX="12">
        <path
            android:fillColor="#EE3C6E"
            android:fillType="evenOdd"
            android:pathData="M1.494 10a0.499 0.499 0 1 1 0-1l-0.364-0.009L6.618 9C7.38 9 8 8.428 8
7.724l-0.025-5.418c0-0.707-0.62-1.281-1.38-1.281l-5.101-0.008a0.5 0.5 0 0 1 0-1l5.101
0.008 c1.312 0 2.38 1.023 2.38 2.279L9 7.722C9 8.979 7.93 10 6.617 10H1.494z" />
    </group>
    <path
        android:fillColor="#EE3C6E"
        android:fillType="evenOdd"
        android:pathData="M10.826 6.81c0.36 0 0.655-0.272 0.663 -0.612l0.12-5.553a0.607 0.607 0 0 0-0.19-0.45 0.68
0.68 0 0 0-0.473-0.188h-0.875a0.685 0.685 0 0 0-0.474 0.188 0.606 0.606 0 0 0-0.188 0.45
l0.12 5.553c0.007 0.34 0.301 0.612 0.662 0.612 h0.635zM11.398
7.911c-0.485-0.45-1.349-0.449-1.828 0a1.163 1.163 0 0 0-0.385 0.87 c0 0.334 0.132 0.634
0.385 0.871 0.243 0.226 0.56 0.346 0.914 0.346s0.672-0.12 0.917 -0.348c0.25-0.235 0.384 -0.536
0.384 -0.869 0-0.334-0.133-0.635-0.387-0.87" />
</vector>
@alexjlockwood
Copy link
Owner

Thanks for reporting! Will get right on it. :)

@alexjlockwood
Copy link
Owner

Fixed in the latest release. You can install the new version by re-running npm install -g avdo.

@Pitel
Copy link
Author

Pitel commented Dec 1, 2017

Yup, now it works as expected :)

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

2 participants