Code Monkey home page Code Monkey logo

Comments (18)

onurcansevinc avatar onurcansevinc commented on June 15, 2024 2

@onurcansevinc is the issue fixed for you too?

I changed version, it solved. Thanks!

from meteor-files.

Leekao avatar Leekao commented on June 15, 2024 1

@Leekao try v2.3.2

Yes! It's working now! thank you very much for your patience!

from meteor-files.

onurcansevinc avatar onurcansevinc commented on June 15, 2024

I have same issue too

from meteor-files.

dr-dimitru avatar dr-dimitru commented on June 15, 2024

@Leekao , error means storagePath not readable or doesn't exists

from meteor-files.

onurcansevinc avatar onurcansevinc commented on June 15, 2024

@Leekao , error means storagePath not readable or doesn't exists

I didn't change/define the storagePath, so it's default

from meteor-files.

Leekao avatar Leekao commented on June 15, 2024

@Leekao , error means storagePath not readable or doesn't exists

The directory was created on C:\ by the constructor, I can see it.
@dr-dimitru I see you tagged "Need more info", what more info do you need from me?

from meteor-files.

dr-dimitru avatar dr-dimitru commented on June 15, 2024

@Leekao

  1. not followed our ISSUE_TEMPLATE
  2. Server logs are not full and should output storagePath you've set at the beginning
  3. Seems like a simple issue related to usage on Windows, not related to the package

from meteor-files.

Leekao avatar Leekao commented on June 15, 2024

@Leekao

  1. not followed our ISSUE_TEMPLATE
  2. Server logs are not full and should output storagePath you've set at the beginning
  3. Seems like a simple issue related to usage on Windows, not related to the package

Here is the full log I have:

I20221103-03:15:02.402(2)? [FilesCollection.storagePath] Set to: C:\AOC_tmp\wavs
I20221103-03:15:02.419(2)? ** You've set up some data subscriptions with Meteor.publish(), but
I20221103-03:15:02.419(2)? ** you still have autopublish turned on. Because autopublish is still
I20221103-03:15:02.420(2)? ** on, your Meteor.publish() calls won't have much effect. All data
I20221103-03:15:02.421(2)? ** will still be sent to all clients.
I20221103-03:15:02.422(2)? **
I20221103-03:15:02.424(2)? ** Turn off autopublish by removing the autopublish package:
I20221103-03:15:02.426(2)? **
I20221103-03:15:02.427(2)? **   $ meteor remove autopublish
I20221103-03:15:02.428(2)? **
I20221103-03:15:02.429(2)? ** .. and make sure you have Meteor.publish() and Meteor.subscribe() calls
I20221103-03:15:02.429(2)? ** for each collection that you want clients to see.
I20221103-03:15:02.429(2)?
I20221103-03:15:02.478(2)? [FilesCollection] [find({}, undefined)]
I20221103-03:15:02.478(2)? [FilesCollection] [FilesCursor] [fetch()]
I20221103-03:15:02.481(2)? { files: [] }
I20221103-03:15:02.485(2)? []
I20221103-03:15:02.486(2)? [FilesCollection] [find({}, undefined)]
I20221103-03:15:02.487(2)? [FilesCollection] [FilesCursor] [fetch()]
I20221103-03:15:02.492(2)? { files: [] }
I20221103-03:15:02.492(2)? started
=> Meteor server restarted
I20221103-03:15:30.665(2)? [FilesCollection] [find({}, undefined)]
I20221103-03:46:02.374(2)? [FilesCollection] [find({}, undefined)]
I20221103-03:46:15.148(2)? [FilesCollection] [File Start Method] output3.wav - 896zbB9C9A3uw3Sd5
I20221103-03:46:15.150(2)? [FilesCollection] [Upload] [DDP Start Method] Got #-1/1 chunks, dst: output3.wav
I20221103-03:46:15.196(2)? Exception in callback of async function: Error: ENOENT: no such file or directory, mkdir
I20221103-03:46:15.196(2)?     at Object.mkdirSync (fs.js:1014:3)
I20221103-03:46:15.197(2)?     at packages/ostrio:files/write-stream.js:47:16
I20221103-03:46:15.199(2)?     at packages/ostrio:files/write-stream.js:10:50
I20221103-03:46:15.200(2)?     at runWithEnvironment (packages\meteor.js:1347:24) {
I20221103-03:46:15.201(2)?   errno: -4058,
I20221103-03:46:15.201(2)?   syscall: 'mkdir',
I20221103-03:46:15.202(2)?   code: 'ENOENT'
I20221103-03:46:15.202(2)? }
I20221103-03:46:15.215(2)? [FilesCollection] [Upload] [DDP] Got #1/1 chunks, dst: output3.wav
I20221103-03:46:15.220(2)? [FilesCollection] [Upload] [DDP] Got #-1/1 chunks, dst: output3.wav
I20221103-06:46:44.807(2)? [FilesCollection] [_preCollectionCursor.observe] [removed]: 896zbB9C9A3uw3Sd5
I20221103-06:46:44.809(2)? [FilesCollection] [_preCollectionCursor.observe] [removeUnfinishedUpload]: 896zbB9C9A3uw3Sd5
I20221103-06:46:44.818(2)? [FilesCollection] [Upload] [finish(ing)Upload] -> C:\AOC_tmp\wavs\896zbB9C9A3uw3Sd5.wav
I20221103-06:46:44.833(2)? [FilesCollection] [Upload] [finish(ed)Upload] -> C:\AOC_tmp\wavs\896zbB9C9A3uw3Sd5.wav
I

The storagePath was created (by the FilesCollections constructor, not by me) and it is empty:

C:\AOC_tmp\wavs>dir
 Volume in drive C is OS
 Volume Serial Number is 1A53-75A5

 Directory of C:\AOC_tmp\wavs

11/02/2022  09:45 PM    <DIR>          .
11/02/2022  09:45 PM    <DIR>          ..
               0 File(s)              0 bytes
               2 Dir(s)  11,220,852,736 bytes free

from meteor-files.

dr-dimitru avatar dr-dimitru commented on June 15, 2024

@Leekao please run same tests on v2.3.1, at least error would be more verbose

from meteor-files.

Leekao avatar Leekao commented on June 15, 2024

@Leekao please run same tests on v2.3.1, at least error would be more verbose

This is the error I'm getting now:

I20221103-15:35:46.738(2)? Exception in callback of async function: errorClass [Error]: [FilesCollection] [writeStream] [constructor] [mkdirSync] ERROR: can not make/ensure directory  [500]
I20221103-15:35:46.739(2)?     at packages/ostrio:files/write-stream.js:50:21
I20221103-15:35:46.741(2)?     at packages/ostrio:files/write-stream.js:10:50
I20221103-15:35:46.742(2)?     at runWithEnvironment (packages\meteor.js:1347:24) {
I20221103-15:35:46.743(2)?   isClientSafe: true,
I20221103-15:35:46.744(2)?   error: 500,
I20221103-15:35:46.744(2)?   reason: '[FilesCollection] [writeStream] [constructor] [mkdirSync] ERROR: can not make/ensure directory ',
I20221103-15:35:46.745(2)?   details: Error: ENOENT: no such file or directory, mkdir
I20221103-15:35:46.745(2)?       at Object.mkdirSync (fs.js:1014:3)
I20221103-15:35:46.745(2)?       at packages/ostrio:files/write-stream.js:48:18
I20221103-15:35:46.747(2)?       at packages/ostrio:files/write-stream.js:10:50
I20221103-15:35:46.747(2)?       at runWithEnvironment (packages\meteor.js:1347:24) {
I20221103-15:35:46.749(2)?     errno: -4058,
I20221103-15:35:46.749(2)?     syscall: 'mkdir',
I20221103-15:35:46.750(2)?     code: 'ENOENT'
I20221103-15:35:46.750(2)?   },
I20221103-15:35:46.750(2)?   errorType: 'Meteor.Error'
I20221103-15:35:46.751(2)? }

I'm sorry but I still don't understand what is wrong.

from meteor-files.

dr-dimitru avatar dr-dimitru commented on June 15, 2024

@Leekao You can at least try

  1. Using other directories
  2. Using default directory (not setting any value at all)

from meteor-files.

dr-dimitru avatar dr-dimitru commented on June 15, 2024

I assume you pass empty directory from this error message:

[FilesCollection] [writeStream] [constructor] [mkdirSync] ERROR: can not make/ensure directory  [500]

See this line, message should end with the path you've retuned from your function, and it's empty string

from meteor-files.

dr-dimitru avatar dr-dimitru commented on June 15, 2024

@Leekao because you've never posted your actual code and FilesCollection definition.

from meteor-files.

Leekao avatar Leekao commented on June 15, 2024

@Leekao You can at least try

  1. Using other directories
  2. Using default directory (not setting any value at all)

I tried that already and it did not work, this is my FilesCollection definition file:

import { Meteor } from 'meteor/meteor';
import { FilesCollection } from 'meteor/ostrio:files';
import path from 'path'

export const Wavs = new FilesCollection({
  collectionName: 'wavs',
  debug: true,
  storagePath: path.resolve('/AOC_tmp/wavs'),
});


if (Meteor.isClient) {
  Meteor.subscribe('files.wavs.all');
}

if (Meteor.isServer) {
  Meteor.publish('files.wavs.all', function () {
    return Wavs.find().cursor;
  });
}

And this is the code I use to insert:

 const onComplete = (blob) => {
    const outputFile = new File([blob], "output3.wav")
    console.log({outputFile})
    const upload_instance = Wavs.insert({
      file: outputFile,
      chunkSize: 'dynamic'
    }, true)
    upload_instance.on('end', (e, f) => {
      console.log(e, f)
      Meteor.call('New File', f)
    })

from meteor-files.

dr-dimitru avatar dr-dimitru commented on June 15, 2024

@Leekao try v2.3.2

from meteor-files.

dr-dimitru avatar dr-dimitru commented on June 15, 2024

Feel free to close it in case if the issue is solved on your end.

from meteor-files.

Leekao avatar Leekao commented on June 15, 2024

@onurcansevinc is the issue fixed for you too?

from meteor-files.

knoxgon avatar knoxgon commented on June 15, 2024

[SOLVED]

This issue still exists. The version bump to ostrio:[email protected] introduced the problem. The previous version was @1.14.3
Intresting that it works for others.

And I haven't defined storagePath. Also, removed node_modules and local folder in .meteor to freshly install npm packages to ensure the removal of footprints of old packages.

Do I have to set storagePath to something? Previously, I dind't need to do that. The process has full access rights to the parent folder so I don't see any permission errors.
The OS platform is Windows 10.

I read at the following post that the storagePath could be set to a defined space on disk but I don't really understand why this is required now. In such case, I think I could define it but I wonder what could've triggered for this change to be made. I'll be back after setting the storagePath.

export const UserFiles = new FilesCollection({
  collectionName: 'UserFiles',
  allowClientCode: false,
  schema: UserFilesSchema,
  onAfterUpload: ...,
  interceptDownload: ...,
  onAfterRemove: ...
});

EDIT: OK, I see that after defining the storagePath, it actually starts working. The process creates the named folder in C: disk as C:\.uploadedFiles but I don't find any files there. However, the files are pushed to the database.

export const UserFiles = new FilesCollection({
  collectionName: 'UserFiles',
  storagePath: '/.uploadedFiles/',
  allowClientCode: false,
  schema: UserFilesSchema,
  onAfterUpload: ...,
  interceptDownload: ...,
  onAfterRemove: ...
});

from meteor-files.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.